\SimpleCachePublisher
Service style class responsible for publishing urls into a cache
- Author: marcus@silverstripe.com.au
- License: BSD License http://silverstripe.org/bsd-license/
Synopsis
class SimpleCachePublisher
{
- // constants
- const CACHE_PUBLISH = '__cache_publish';
- // members
- public array $excludeTypes = ;
- public SimpleCache $cache;
- protected $staticBaseUrl = NULL;
- protected boolean $echoProgress = false;
- protected boolean $optInCaching = true;
- public boolean $useJobs = true;
- public integer $jobThreshold = 0;
- // methods
- public void setStaticBaseUrl()
- public void setOptInCaching()
- public void getOptInCaching()
- public void publishDataObject()
- public void clearDynamicCacheFor()
- public type dontCache()
- protected void publishUrls()
- public void recacheFragments()
- public array unpublishObject()
- public void unpublishUrls()
- public void publishPages()
- public Array urlsToPaths()
- protected void getCache()
- protected void out()
Tasks
Line | Task |
---|---|
219 | - Make a more memory efficient publisher |
442 | - Make a more memory efficient publisher |
Constants
Name | Value |
---|---|
CACHE_PUBLISH | '__cache_publish' |
Members
protected
- $echoProgress
- $optInCaching
—
boolean
Does the user need to "opt in" for caching pages? - $staticBaseUrl
public
- $cache — SimpleCache
- $excludeTypes
- $jobThreshold
—
int
If useJobs = false, we _may_ still opt to use them of the jobThreshold is set - $useJobs
—
boolean
Use queuedjobs for generating cached data?
Methods
protected
public
- clearDynamicCacheFor() — Clears the dynamic cached data for a particular data object
- dontCache() — Indicate whether we "don't" cache the given object
- getOptInCaching()
- publishDataObject()
- publishPages()
- recacheFragments() — Recache fragments of a data object
- setOptInCaching()
- setStaticBaseUrl()
- unpublishObject()
- unpublishUrls() — Unpublish a list of URLs
- urlsToPaths() — Transforms relative or absolute URLs to their static path equivalent.