Refactor caching of public root path in SUI core

This commit is contained in:
Max 2024-03-03 09:58:33 +08:00
parent b82f6f6029
commit e510cb2649

View file

@ -74,10 +74,10 @@ func (sui *DSL) PublicRootWithSid(sid string) (string, error) {
// PublicRoot returns the public root path
func (sui *DSL) PublicRoot(data map[string]interface{}) (string, error) {
// Cache the public root
if sui.publicRoot != "" {
return sui.publicRoot, nil
}
// Cache the public root (Close the cache)
// if sui.publicRoot != "" {
// return sui.publicRoot, nil
// }
if data == nil {
data = map[string]interface{}{}