Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Store\CacheAwarePropertyInfoStore Class Reference

Implementation of PropertyInfoStore wrapping the instance modifying the local PropertyInfoStore and adjusting the property info cache accordingly. More...

+ Inheritance diagram for Wikibase\Lib\Store\CacheAwarePropertyInfoStore:
+ Collaboration diagram for Wikibase\Lib\Store\CacheAwarePropertyInfoStore:

Public Member Functions

 __construct (PropertyInfoStore $store, WANObjectCache $cache, $cacheDuration=3600, $cacheKeyGroup='')
 
 setPropertyInfo (NumericPropertyId $propertyId, array $info)
 
 removePropertyInfo (NumericPropertyId $propertyId)
 

Public Attributes

const CACHE_CLASS = 'CacheAwarePropertyInfoStore'
 
- Public Attributes inherited from Wikibase\Lib\Store\PropertyInfoStore
const KEY_CANONICAL_URI = 'canonicalURI'
 Key to use in the info array for the property's canonical URI pattern.
 

Protected Attributes

 $innerStore
 
 $cache
 
 $cacheDuration
 
 $cacheKeyGroup
 

Private Member Functions

 getFullTableCacheKey ()
 
 getSinglePropertyCacheKey (NumericPropertyId $propertyId)
 
 deleteFullTableCacheKey ()
 
 deleteCacheKeyForProperty (NumericPropertyId $propertyId)
 

Private Attributes

 $logger
 

Detailed Description

Implementation of PropertyInfoStore wrapping the instance modifying the local PropertyInfoStore and adjusting the property info cache accordingly.

Note: In-process cache (e.g. held by CachingPropertyInfoLookup instances) is NOT updated when changes are done by the store. Note: Cache keys used by this class should be in sync with keys used by CachingPropertyInfoLookup instances.

Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Store\CacheAwarePropertyInfoStore::__construct ( PropertyInfoStore  $store,
WANObjectCache  $cache,
  $cacheDuration = 3600,
  $cacheKeyGroup = '' 
)
Parameters
PropertyInfoStore$storeThe info store to call back to.
WANObjectCache$cache
int$cacheDurationNumber of seconds to keep the cached version for. Defaults to 3600 seconds = 1 hour.
string$cacheKeyGroupGroup name of the Wikibases to be used when generating global cache keys

Member Function Documentation

◆ deleteCacheKeyForProperty()

Wikibase\Lib\Store\CacheAwarePropertyInfoStore::deleteCacheKeyForProperty ( NumericPropertyId  $propertyId)
private

◆ deleteFullTableCacheKey()

Wikibase\Lib\Store\CacheAwarePropertyInfoStore::deleteFullTableCacheKey ( )
private

◆ getFullTableCacheKey()

Wikibase\Lib\Store\CacheAwarePropertyInfoStore::getFullTableCacheKey ( )
private

◆ getSinglePropertyCacheKey()

Wikibase\Lib\Store\CacheAwarePropertyInfoStore::getSinglePropertyCacheKey ( NumericPropertyId  $propertyId)
private

◆ removePropertyInfo()

Wikibase\Lib\Store\CacheAwarePropertyInfoStore::removePropertyInfo ( NumericPropertyId  $propertyId)
See also
PropertyInfoStore::removePropertyInfo
Parameters
NumericPropertyId$propertyId
Returns
bool

Implements Wikibase\Lib\Store\PropertyInfoStore.

◆ setPropertyInfo()

Wikibase\Lib\Store\CacheAwarePropertyInfoStore::setPropertyInfo ( NumericPropertyId  $propertyId,
array  $info 
)
See also
PropertyInfoStore::setPropertyInfo
Parameters
NumericPropertyId$propertyId
array$info
Exceptions
InvalidArgumentException

Implements Wikibase\Lib\Store\PropertyInfoStore.

Member Data Documentation

◆ $cache

Wikibase\Lib\Store\CacheAwarePropertyInfoStore::$cache
protected

◆ $cacheDuration

Wikibase\Lib\Store\CacheAwarePropertyInfoStore::$cacheDuration
protected

◆ $cacheKeyGroup

Wikibase\Lib\Store\CacheAwarePropertyInfoStore::$cacheKeyGroup
protected

◆ $innerStore

Wikibase\Lib\Store\CacheAwarePropertyInfoStore::$innerStore
protected

◆ $logger

Wikibase\Lib\Store\CacheAwarePropertyInfoStore::$logger
private

◆ CACHE_CLASS

const Wikibase\Lib\Store\CacheAwarePropertyInfoStore::CACHE_CLASS = 'CacheAwarePropertyInfoStore'

The documentation for this class was generated from the following file: