Extension:PhpTags Wiki/Reference/WCache

The WCache class manages the cache of page rendering.
 * static methods and properties works with the objects of current page

Constants

 * CACHE_TIME : Time when this page was rendered. Returns DateTime object and it will cause an error if nothing provides DateTime object. DateTime object may be provided by the PhpTags Functions extension.
 * CACHE_TIME_STRING : Time when this page was rendered.

cacheExpiry

 * Description

The number of seconds after which cache of current page should expire If set to a value greater than a value previously set, the new assignment has no effect.
 * Setting WCache::$cacheExpiry does not work properly due to bug 67997

Returns a value smaller or equal to the smallest number assigned to WCache::$cacheExpiry.
 * Get

The number of seconds.
 * Set

disableCache

 * Description

Set a flag in the page renderings cache indicating that the content is dynamic and shouldn't be cached.

Examples
demo
 * Example 1