SilverCart\ORM\DataObjectCacheExtension
Extension for every DataObject.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class DataObjectCacheExtension
extends DataExtension
{
- // members
- protected array $onAfterWriteInProgress = ;
- protected array $skipCacheRefresh = ;
- protected array $skipExtendedCacheRefresh = ;
- private static array $db = ;
- // methods
- public boolean getSkipCacheRefresh()
- public $this->owner setSkipCacheRefresh()
- public boolean SkipCacheRefresh()
- public boolean getSkipExtendedCacheRefresh()
- public $this->owner setSkipExtendedCacheRefresh()
- public boolean SkipExtendedCacheRefresh()
- public void updateCMSFields()
- public void markForCacheRefresh()
- public array getCacheRelevantFields()
- public void onAfterWrite()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Members
private
-
$db
DB attributes
protected
- $onAfterWriteInProgress
—
array
Determines whether self::onAfterWrite() is in progress to prevent a potential endless loop. - $skipCacheRefresh
—
array
Can be set to true by each DataObject to prevent a cache refresh. - $skipExtendedCacheRefresh
—
array
Can be set to true by each DataObject to prevent a cache refresh.
Methods
public
- SkipCacheRefresh() — Returns the skip cache refresh setting.
- SkipExtendedCacheRefresh() — Returns the skip extended cache refresh setting.
- getCacheRelevantFields() — Returns a list of cache relevant fields.
- getSkipCacheRefresh() — Returns the skip cache refresh setting.
- getSkipExtendedCacheRefresh() — Returns the skip extended cache refresh setting.
- markForCacheRefresh() — Updates LastEditedForCache to the current date and time.
- onAfterWrite() — Changes the LastEditedForCache property if a cache relevant field is changed.
- setSkipCacheRefresh() — Sets the skip cache refresh setting.
- setSkipExtendedCacheRefresh() — Sets the skip extended cache refresh setting.
- updateCMSFields() — Removes the LastEditedForCache field.