Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
SMW\InMemoryPoolCache Class Reference

Public Member Functions

 __construct (CacheFactory $cacheFactory)
 
 resetPoolCacheById ($poolCacheName= '')
 
 getStats ($format=null)
 
 getPoolCacheFor ($poolCacheName, $cacheSize=500)
 
 getPoolCacheById ($poolCacheId, $cacheSize=500)
 

Static Public Member Functions

static getInstance ()
 
static clear ()
 

Public Attributes

const FORMAT_PLAIN = StatsFormatter::FORMAT_PLAIN
 
const FORMAT_JSON = StatsFormatter::FORMAT_JSON
 
const FORMAT_HTML = StatsFormatter::FORMAT_HTML
 

Detailed Description

A multipurpose non-persistent static pool cache to keep selected items for the duration of a request cacheable.

GNU GPL v2+

Since
2.3
Author
mwjames

Constructor & Destructor Documentation

SMW\InMemoryPoolCache::__construct ( CacheFactory  $cacheFactory)
Since
2.3
Parameters
CacheFactory$cacheFactory

Member Function Documentation

static SMW\InMemoryPoolCache::clear ( )
static
Since
2.3
static SMW\InMemoryPoolCache::getInstance ( )
static
Since
2.3
Returns
InMemoryPoolCache
SMW\InMemoryPoolCache::getPoolCacheById (   $poolCacheId,
  $cacheSize = 500 
)
Since
2.5
Parameters
string$poolCacheId
integer$cacheSize
Returns
Cache
SMW\InMemoryPoolCache::getPoolCacheFor (   $poolCacheName,
  $cacheSize = 500 
)
Deprecated:
since 2.5, use InMemoryPoolCache::getPoolCacheById
Since
2.3
Parameters
string$poolCacheName
integer$cacheSize
Returns
Cache
SMW\InMemoryPoolCache::getStats (   $format = null)
Since
2.4
Parameters
string | null$format
Returns
string|array
SMW\InMemoryPoolCache::resetPoolCacheById (   $poolCacheName = '')
Since
2.3
Parameters
string$poolCacheName

Member Data Documentation

const SMW\InMemoryPoolCache::FORMAT_HTML = StatsFormatter::FORMAT_HTML

Stats as HTML list output

const SMW\InMemoryPoolCache::FORMAT_JSON = StatsFormatter::FORMAT_JSON

Stats as JSON output

const SMW\InMemoryPoolCache::FORMAT_PLAIN = StatsFormatter::FORMAT_PLAIN

Stats as plain string


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