Merge pull request #585 from trheyi/main
Refactor caching of public root path in SUI core
This commit is contained in:
commit
0ad4a5030d
1 changed files with 4 additions and 4 deletions
|
|
@ -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{}{}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue