CacheDecorator
class CacheDecorator implements ConfigRepository
저장소를 wrapping 하여 cache 에 있는 정보는 저장소에 요청되지 않고 cache 에서 반환 되도록 함
Properties
protected ConfigRepository | $repo | repository instance | |
protected Repository | $cache | cache instance | |
protected int | $minutes | expire time | |
protected string | $prefix | Prefix for cache key | |
protected array | $bag | memory cache |
Methods
find(string $siteKey, string $name)
search getter
array
fetchAncestor(string $siteKey, string $name)
search ancestors getter
array
fetchDescendant(string $siteKey, string $name)
search descendants getter
void
void
remove(string $siteKey, string $name)
remove
void
void
array
getData(string $siteKey, string $head)
get cached data
void
erase(string $siteKey, string $name)
Remove cache data
string
getHead(string $name)
parse name to head and segments
string
makeKey(string $siteKey, string $name)
Make key by combination of site key and config name
string
getCacheKey(string $keyword)
String for cache key
Details
at line 78
__construct(ConfigRepository $repo, Repository $cache, int $minutes = 60)
create instance
at line 92
ConfigEntity
find(string $siteKey, string $name)
search getter
at line 108
array
fetchAncestor(string $siteKey, string $name)
search ancestors getter
at line 124
array
fetchDescendant(string $siteKey, string $name)
search descendants getter
at line 139
ConfigEntity
save(ConfigEntity $config)
save
at line 153
void
clearLike(ConfigEntity $config, array $excepts = array())
clear all just descendants vars
at line 167
void
remove(string $siteKey, string $name)
remove
at line 181
void
foster(ConfigEntity $config, string $to)
Parent Changing with descendant
at line 196
void
affiliate(ConfigEntity $config, string $to)
affiliated to another config
at line 211
protected array
getData(string $siteKey, string $head)
get cached data
at line 240
protected void
erase(string $siteKey, string $name)
Remove cache data
at line 254
private string
getHead(string $name)
parse name to head and segments
at line 268
protected string
makeKey(string $siteKey, string $name)
Make key by combination of site key and config name
at line 279
protected string
getCacheKey(string $keyword)
String for cache key