Manual:CacheTime.php

From mediawiki.org

Parser cache specific expiry check, including methods to set the time of caching and the time when cache should expire. It implements ParserCacheMetadata and JsonUnserializable and is extended by ParserOutput.

Public methods[edit]

  • setCacheTime() - set the timestamp expressing when the page has been rendered.
  • getCacheRevisionId() - get Revision id if any.
  • setCacheRevisionId()
  • updateCacheExpiry() - sets the number of seconds after which this object should expire.
  • getCacheExpiry() - return the number of seconds after which this object should expire.
  • isCacheable()
  • expired() - return true if this cached output object predates the global or per-article cache invalidation timestamps, or if it comes from an incompatible older version.
  • isDifferentRevision() - return true if this cached output object is for a different revision of the page.
  • getUsedOptions() - return the options from its ParserOptions which have been taken into account to produce the output.
  • recordOption() - tag a parser option for use in the cache key for this parser output. Registered as a watcher at ParserOptions::registerWatcher() by Parser::clearState().
  • recordOptions() - tag a list of parser option names for use in the cache key for this parser output.
  • newFromJsonArray()
  • magic functions

Extending[edit]

CacheTime is extended by ParserOutput.