\Cacheable
Gives {@link SiteTree} objects caching abilities.
- Author: Deviate Ltd 2014-2015 http://www.deviate.net.nz
Synopsis
class Cacheable
extends SiteTreeExtension
{
- // members
- public static $_cached_navigation;
- public $start_time;
- public $end_time;
- // methods
- public void contentControllerInit()
- public void onAfterWrite()
- public void onAfterPublish()
- public void onAfterUnpublish()
- public void onAfterDelete()
- public void refreshPageCache()
- public void removePageCache()
- public mixed CachedNavigation()
- public mixed CachedData()
- public static boolean is_flush()
- public static array get_cache_files()
- public static boolean build_cache_onload()
- public void StartTime()
- public void EndTime()
- public void TimeConsumed()
Hierarchy
Extends
- SiteTreeExtension
Tasks
Line | Task |
---|---|
10+ | Remove capitalised template-methods |
35+ | add queuedjob chunking ala BuildTask to this csche-rebuild logic. At the moment we attempt to skip it if build_cache_onload is set to false in YML Config |
212+ | What to do with controller URLs other than returning the homepage's cache? |
243+ | add tests |
286+ | Add tests |
Members
public
- $end_time
- $start_time
Methods
public
- CachedData() — Usually used in template logic inside <% with %> blocks.
- EndTime()
- StartTime()
- TimeConsumed()
- build_cache_onload() — Current module default is to build the cache if it's not present via a browser request after the "first user pays" pattern. This may not be desirable on sites with 1000s of page objects.
- contentControllerInit() — Initialises a pre-built cache (via {@link CacheableNavigation_Rebuild}) used by front-end calling logic e.g. via $CachedData blocks in .ss templates unless build_on_reload is set to false in YML config.
- get_cache_files() — Build an array of object-cache files from the filesystem.
- is_flush() — Detect if a flush operation is happening.
- onAfterDelete()
- onAfterPublish()
- onAfterUnpublish()
- onAfterWrite()
- refreshPageCache()
- removePageCache()