Semantic MediaWiki and related extensions
Public Member Functions | List of all members
SIL\LanguageTargetLinksCache Class Reference

Public Member Functions

 __construct (Cache $cache, CacheKeyProvider $cacheKeyProvider)
 
 setPageLanguageCacheStrategy ($pageLanguageCacheStrategy)
 
 getPageLanguageFromCache (Title $title)
 
 pushPageLanguageToCache (Title $title, $languageCode)
 
 getLanguageTargetLinksFromCache (InterlanguageLink $interlanguageLink)
 
 saveLanguageTargetLinksToCache (InterlanguageLink $interlanguageLink, array $languageTargetLinks)
 
 deleteLanguageTargetLinksFromCache (array $linkReferences)
 
 deletePageLanguageForTargetFromCache (Title $title)
 

Detailed Description

To make a page view responsive and avoid a repetitive or exhausting query process, this class is expected to cache all objects necessary and be accessible through the InterlanguageLinksLookup class.

It is expected that the cache uses a "Composite" approach in order for short-lived requests to be stored in-memory while other information are stored on a persistence layer to increase lookup performance for succeeding requests.

GNU GPL v2+

Since
1.0
Author
mwjames

Constructor & Destructor Documentation

SIL\LanguageTargetLinksCache::__construct ( Cache  $cache,
CacheKeyProvider  $cacheKeyProvider 
)
Since
1.0
Parameters
Cache$cache
CacheKeyProvider$cacheKeyProvider

Member Function Documentation

SIL\LanguageTargetLinksCache::deleteLanguageTargetLinksFromCache ( array  $linkReferences)
Since
1.0
Parameters
DIWikiPage[]$linkReferences
SIL\LanguageTargetLinksCache::deletePageLanguageForTargetFromCache ( Title  $title)
Since
1.0
Parameters
Title$title
SIL\LanguageTargetLinksCache::getLanguageTargetLinksFromCache ( InterlanguageLink  $interlanguageLink)
Since
1.0
Parameters
InterlanguageLink$interlanguageLink
Returns
boolean|array
SIL\LanguageTargetLinksCache::getPageLanguageFromCache ( Title  $title)
Since
1.0
Parameters
Title$title
boolean|string
SIL\LanguageTargetLinksCache::pushPageLanguageToCache ( Title  $title,
  $languageCode 
)
Since
1.0
Parameters
Title$title
string$languageCode
SIL\LanguageTargetLinksCache::saveLanguageTargetLinksToCache ( InterlanguageLink  $interlanguageLink,
array  $languageTargetLinks 
)
Since
1.0
Parameters
InterlanguageLink$interlanguageLink
array$languageTargetLinks
SIL\LanguageTargetLinksCache::setPageLanguageCacheStrategy (   $pageLanguageCacheStrategy)
Since
1.0
Parameters
string$pageLanguageCacheStrategy

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