Merge pull request #585 from trheyi/main

Refactor caching of public root path in SUI core
This commit is contained in:
Max 2024-03-03 10:00:03 +08:00 committed by GitHub
commit 0ad4a5030d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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{}{}