TractorCow\DynamicCache\DynamicCache
Handles on the fly caching of pages
- Author: Damian Mooyman
Synopsis
class DynamicCache
implements
Flushable
{
- // members
- protected static DynamicCache $instance;
- // methods
- public static void flush()
- public static void bypass_cache()
- public static DynamicCache inst()
- protected boolean enabled()
- protected boolean headersAllowCaching()
- protected void yieldControl()
- protected void getCache()
- protected string getCacheKey()
- protected void presentCachedResult()
- protected void cacheResult()
- public void clear()
- protected array getCacheableHeaders()
- public void run()
Hierarchy
Uses
- SilverStripe\Core\Extensible
- SilverStripe\Core\Injector\Injectable
- SilverStripe\Core\Config\Configurable
Implements
- SilverStripe\Core\Flushable
Members
protected
- $instance
—
TractorCow\DynamicCache\DynamicCache
Instance of DynamicCache
Methods
protected
- cacheResult() — Save a page result into the cache
- enabled() — Determine if the cache should be enabled for the current request
- getCache() — Returns the caching factory
- getCacheKey() — Determines identifier by which this page should be identified, given a specific url
- getCacheableHeaders() — Determine which already sent headers should be cached
- headersAllowCaching() — Determine if the specified headers permit this page to be cached
- presentCachedResult() — Sends the cached value to the browser, including any necessary headers
- yieldControl() — Returns control of page rendering to SilverStripe
public
- bypass_cache()
- clear() — Clear the cache
- flush()
- inst() — Return the current cache instance
- run() — Activate caching on a given url