Remove the hostname prefix from the directory cache key

This commit is contained in:
FusionPBX
2026-03-04 11:55:42 -07:00
committed by GitHub
parent 9f56ac9e30
commit df54d9eed6
16 changed files with 46 additions and 46 deletions

View File

@@ -235,17 +235,17 @@ if ( session:ready() ) then
--clear the cache
if (user_name ~= nil and context ~= nil) then
if (cache.support()) then
cache.del(hostname..":directory:"..user_name.."@"..context);
cache.del("directory:"..user_name.."@"..context);
if #number_alias > 0 then
cache.del(hostname..":directory:"..number_alias.."@"..domain_name);
cache.del("directory:"..number_alias.."@"..domain_name);
end
end
end
if (db_extension ~= nil and context ~= nil) then
if (cache.support()) then
cache.del(hostname..":directory:"..db_extension.."@"..context);
cache.del("directory:"..db_extension.."@"..context);
if #number_alias > 0 then
cache.del(hostname..":directory:"..number_alias.."@"..domain_name);
cache.del("directory:"..number_alias.."@"..domain_name);
end
end
end