Semantic MediaWiki and related extensions
|
Public Member Functions | |
__construct (Store $store, QueryFactory $queryFactory, BlobStore $blobStore, BufferedStatsdCollector $bufferedStatsdCollector) | |
getStats () | |
setDependantHashIdExtension ( $dependantHashIdExtension) | |
setLogger (LoggerInterface $logger) | |
setQueryEngine (QueryEngine $queryEngine) | |
isEnabled () | |
disableCache () | |
recordStats () | |
setNonEmbeddedCacheLifetime ( $nonEmbeddedCacheLifetime) | |
getQueryResult (Query $query) | |
invalidate (array $queryList, $context='') | |
resetCacheBy ( $items, $context='') | |
Public Attributes | |
const | VERSION = '1' |
const | CACHE_NAMESPACE = 'smw:query:store' |
const | STATSD_ID = 'smw:query:store:1:d:' |
const | POOLCACHE_ID = 'queryresult.prefetcher' |
The prefetcher only caches the subject list from a computed a query condition. The result is processed before an individual query printer has access to the query result hence it does not interfere with the final string output manipulation.
The main objective is to avoid unnecessary computing of results for queries that have the same query signature. PrintRequests as part of a QueryResult object are not cached and are not part of a query signature.
Cache eviction is carried out either manually (action=purge) or executed through the QueryDepedencyLinksStore.
GNU GPL v2+
SMW\Query\Result\CachedQueryResultPrefetcher::__construct | ( | Store | $store, |
QueryFactory | $queryFactory, | ||
BlobStore | $blobStore, | ||
BufferedStatsdCollector | $bufferedStatsdCollector | ||
) |
Store | $store | |
QueryFactory | $queryFactory | |
BlobStore | $blobStore | |
BufferedStatsdCollector | $bufferedStatsdCollector |
SMW\Query\Result\CachedQueryResultPrefetcher::disableCache | ( | ) |
QueryEngine | $queryEngine |
SMW\Query\Result\CachedQueryResultPrefetcher::getQueryResult | ( | Query | $query | ) |
Returns a QueryResult object that matches the condition described by a query.
Query | $query |
Implements SMW\QueryEngine.
SMW\Query\Result\CachedQueryResultPrefetcher::getStats | ( | ) |
SMW\Query\Result\CachedQueryResultPrefetcher::invalidate | ( | array | $queryList, |
$context = '' |
|||
) |
array | $ids | |
string | $context |
SMW\Query\Result\CachedQueryResultPrefetcher::isEnabled | ( | ) |
boolean |
SMW\Query\Result\CachedQueryResultPrefetcher::recordStats | ( | ) |
SMW\Query\Result\CachedQueryResultPrefetcher::resetCacheBy | ( | $items, | |
$context = '' |
|||
) |
DIWikiPage | array | $items | |
string | $context |
SMW\Query\Result\CachedQueryResultPrefetcher::setDependantHashIdExtension | ( | $dependantHashIdExtension | ) |
string | integer | $dependantHashIdExtension |
SMW\Query\Result\CachedQueryResultPrefetcher::setLogger | ( | LoggerInterface | $logger | ) |
LoggerInterface | $logger |
SMW\Query\Result\CachedQueryResultPrefetcher::setNonEmbeddedCacheLifetime | ( | $nonEmbeddedCacheLifetime | ) |
integer | boolean | $nonEmbeddedCacheLifetime |
SMW\Query\Result\CachedQueryResultPrefetcher::setQueryEngine | ( | QueryEngine | $queryEngine | ) |
QueryEngine | $queryEngine |
const SMW\Query\Result\CachedQueryResultPrefetcher::CACHE_NAMESPACE = 'smw:query:store' |
Namespace occupied by the BlobStore
const SMW\Query\Result\CachedQueryResultPrefetcher::POOLCACHE_ID = 'queryresult.prefetcher' |
ID for the tempCache
const SMW\Query\Result\CachedQueryResultPrefetcher::STATSD_ID = 'smw:query:store:1:d:' |
ID used by the bufferedStatsdCollector, requires to be changed in case the data schema is modified
PHP 5.6 can do self::CACHE_NAMESPACE . ':' . self::VERSION
const SMW\Query\Result\CachedQueryResultPrefetcher::VERSION = '1' |
Update this version number when the serialization format changes.