Cleanup KeyPathHelper a bit

This commit is contained in:
the-djmaze 2024-03-11 11:05:41 +01:00
parent df7b11eadb
commit f726ac7061
3 changed files with 2 additions and 12 deletions

View file

@ -9,11 +9,6 @@ class KeyPathHelper
return '/Sso/Data/'.$sSsoHash.'/Login/';
}
static public function RepositoryCacheFile(string $sRepo, string $sRepoFile) : string
{
return '/RepositoryCache/Repo/'.$sRepo.'/File/'.$sRepoFile;
}
static public function ReadReceiptCache(string $sEmail, string $sFolderFullName, int $iUid) : string
{
return '/ReadReceipt/'.$sEmail.'/'.$sFolderFullName.'/'.$iUid;
@ -29,11 +24,6 @@ class KeyPathHelper
return '/PluginsJsCache/'.$sPluginsHash.'/'.APP_VERSION.'/';
}
static public function CssCache(string $sTheme, string $sHash) : string
{
return '/CssCache/'.$sHash.'/'.$sTheme.'/'.APP_VERSION.'/';
}
static public function SessionAdminKey(string $sRand) : string
{
return '/Session/AdminKey/'.\md5($sRand).'/';

View file

@ -458,7 +458,7 @@ class ServiceActions
$bCacheEnabled = !$bAppDebug && $this->Config()->Get('cache', 'system_data', true);
$sCacheFileName = '';
if ($bCacheEnabled) {
$sCacheFileName = KeyPathHelper::CssCache($sTheme, $this->oActions->Plugins()->Hash()) . $sMinify;
$sCacheFileName = '/CssCache/'.$this->oActions->Plugins()->Hash().'/'.$sTheme.'/'.APP_VERSION.'/' . $sMinify;
$this->oActions->verifyCacheByKey(\md5($sCacheFileName . ($bJson ? 1 : 0)));
$sResult = $this->Cacher()->Get($sCacheFileName);
}

View file

@ -73,7 +73,7 @@ abstract class Repository
$oCache = \RainLoop\Api::Actions()->Cacher();
$sCacheKey = \RainLoop\KeyPathHelper::RepositoryCacheFile(static::BASE_URL, $sRepoFile);
$sCacheKey = '/RepositoryCache/Repo/' . static::BASE_URL . '/File/' . $sRepoFile;
$sRep = $oCache->Get($sCacheKey);
if ('' !== $sRep)
{