\CacheableNavigationService
Synopsis
class CacheableNavigationService
{
- // members
- protected SiteConfig $config;
- protected DataObject $model;
- protected $mode;
- public null|Zend_Cache_Frontend_Class $_cached = NULL;
- private Zend_Cache_Frontend_Class $_cacheable_frontend;
- // methods
- public void __construct()
- public static void callback_spl()
- public void set_mode()
- public void get_mode()
- public void set_config()
- public void get_config()
- public void set_model()
- public void get_model()
- public string getIdentifier()
- public CachedNavigation getCacheableFrontEnd()
- public boolean refreshCachedConfig()
- private null applySubsiteTheme()
- public boolean removeCachedPage()
- public boolean refreshCachedPage()
- public boolean completeBuild()
- private static string get_default_cache_tag()
- public void clearInternalCache()
- public void clearCacheableFrontend()
- public boolean|CachedNavigation getObjectCache()
Members
private
- $_cacheable_frontend — Zend_Cache_Frontend_Class
protected
- $config — SiteConfig
- $mode — string
- $model — DataObject
public
- $_cached
—
null|Zend_Cache_Frontend_Class
Internal class-cache for the SiteConfig-cache. This is for performance so we needn't re-call Zend_Cache_Core::load() and suffer exponential increases in peak memory.
Methods
private
- applySubsiteTheme() — Apply the theme configured by the Subsite
- get_default_cache_tag() — Allows us to clear a specific cache (particulalrly test-caches) based on Zend_Cache's tagging system.
public
- __construct()
- callback_spl() — This callback is run before PHP invokes its class-level unserialize() function and for reasons beyond the realms of human understanding (B.R.O.H.A), the module is unable to do anything without this static unless you want {@link Zend_Cache_Frontend_File} to be returned as an instance of _PHP_Incomplete_Class_ instead.
- clearCacheableFrontend()
- clearInternalCache() — Simply clears the internal class cache.
- completeBuild() — Tell the cache frontend that construction of the cache for the given identifier, and model is complete, and save this status back to the cache.
- getCacheableFrontEnd() — Creates and returns an instance of {@link Zend_Cache_Frontend_Class} a proxy to the picked backend cache-class and saves a data-structure to it which _is_ the cached object.
- getIdentifier() — Generates a string-identifier for loading a cache.
- getObjectCache() — Core method to directly fetch the contents of the stored object-cache. You can utilise this in custom / project-specific logic to iterate over and return {@link CacheableSiteTree} and {@link CacheableSiteConfig} objects instead of going to the database.
- get_config()
- get_mode()
- get_model()
- refreshCachedConfig() — "Refreshes" a cache-entry for a {@link SiteConfig} object.
- refreshCachedPage() — "Refreshes" (Removes and builds) a cache-entry for the object (page) given in $this->get_model().
- removeCachedPage() — "Removes" a cache-entry for the object (page) given in $this->get_model().
- set_config()
- set_mode()
- set_model()