Skip to content
laylatichy\nano\core\cache\Cache

useCache() is a helper function to get the cache instance

useCache
():
Cache

php
useCache();

getDuration
():
int

php
useCache()->getDuration();

withDuration
(
int $minutes
):
Cache

php
useCache()->withDuration(10);

getStatus
():
CacheStatus

php
useCache()->getStatus();

withStatus
(
CacheStatus $status
):
Cache

php
useCache()->withStatus(CacheStatus::ENABLED);

disable
():
Cache

php
useCache()->disable();

enable
():
Cache

php
useCache()->enable();

isEnabled
():
bool

php
useCache()->isEnabled();