[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/libs/ -> ProcessCacheLRU.php (summary)

Per-process memory cache for storing items. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

File Size: 148 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ProcessCacheLRU:: (7 methods):
  __construct()
  set()
  has()
  get()
  clear()
  resize()
  ping()


Class: ProcessCacheLRU  - X-Ref

Handles per process caching of items

__construct( $maxKeys )   X-Ref

param: $maxKeys integer Maximum number of entries allowed (min 1).

set( $key, $prop, $value )   X-Ref
Set a property field for a cache entry.
This will prune the cache if it gets too large based on LRU.
If the item is already set, it will be pushed to the top of the cache.

param: $key string
param: $prop string
param: $value mixed
return: void

has( $key, $prop, $maxAge = 0 )   X-Ref
Check if a property field exists for a cache entry.

param: $key string
param: $prop string
param: $maxAge integer Ignore items older than this many seconds (since 1.21)
return: bool

get( $key, $prop )   X-Ref
Get a property field for a cache entry.
This returns null if the property is not set.
If the item is already set, it will be pushed to the top of the cache.

param: $key string
param: $prop string
return: mixed

clear( $keys = null )   X-Ref
Clear one or several cache entries, or all cache entries

param: $keys string|Array
return: void

resize( $maxKeys )   X-Ref
Resize the maximum number of cache entries, removing older entries as needed

param: $maxKeys integer
return: void

ping( $key )   X-Ref
Push an entry to the top of the cache

param: $key string



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1