vB_Datastore_WinCache
extends vB_Datastore
in package
Class for fetching and initializing the vBulletin datastore from WinCache
Tags
Table of Contents
- BITFIELDS_PREFIX = 'bf_'
- BITFIELDS_TITLE = 'bitfields'
- __construct() : mixed
- __serialize() : array<string|int, mixed>
- __sleep() : array<string|int, mixed>
- __unserialize() : void
- __wakeup() : void
- build() : void
- Updates the appropriate cache file
- build_options() : array<string|int, mixed>
- Reads settings from the settings then saves the values to the datastore
- clearValues() : mixed
- This method is intended only for unit testing. Do NOT use it in other context.
- delete() : void
- Delete a datastore entry
- fetch() : void
- Fetches the contents of the datastore from WinCache
- get_value() : mixed
- getKeys() : array<string|int, mixed>
- Get the list of all datastore keys
- getOption() : mixed
- getValue() : mixed
- init_registry() : mixed
- Temporary function to manage initializing the legacy registry from the datastore
- preload() : mixed
- Set an array of items that should be preloaded. These will not be loaded immediately but will be fetched on the first call to getValue.
- registerCount() : mixed
- resetCache() : mixed
- Resets datastore cache
- setOption() : mixed
- setValue() : mixed
- This method is intended only for unit testing. Do NOT use it in other context.
Constants
BITFIELDS_PREFIX
public
mixed
BITFIELDS_PREFIX
= 'bf_'
BITFIELDS_TITLE
public
mixed
BITFIELDS_TITLE
= 'bitfields'
Methods
__construct()
public
__construct(mixed &$config, mixed &$db_assertor) : mixed
Parameters
- $config : mixed
- $db_assertor : mixed
Return values
mixed —__serialize()
public
__serialize() : array<string|int, mixed>
Return values
array<string|int, mixed> —__sleep()
public
__sleep() : array<string|int, mixed>
Return values
array<string|int, mixed> —__unserialize()
public
__unserialize(array<string|int, mixed> $serialized) : void
Parameters
- $serialized : array<string|int, mixed>
Return values
void —__wakeup()
public
__wakeup() : void
Return values
void —build()
Updates the appropriate cache file
public
build([mixed $title = '' ][, mixed $data = '' ], mixed $unserialize[, mixed $storelocal = true ]) : void
Parameters
- $title : mixed = ''
- $data : mixed = ''
- $unserialize : mixed
- $storelocal : mixed = true
-
-- if we should keep a local copy in memory as if this item had been loaded. This prevents the mass rebuilding of large datastore items from overloading the available memory.
Return values
void —build_options()
Reads settings from the settings then saves the values to the datastore
public
build_options() : array<string|int, mixed>
After reading the contents of the setting table, the function will rebuild the $vbulletin->options array, then serialize the array and save that serialized array into the 'options' entry of the datastore in the database
Extracted from adminfunctions.php
Return values
array<string|int, mixed> —The $vbulletin->options array
clearValues()
This method is intended only for unit testing. Do NOT use it in other context.
public
clearValues() : mixed
Clear all the cache class vars, useful to calculate every value again.
Return values
mixed —delete()
Delete a datastore entry
public
delete(mixed $title) : void
Parameters
- $title : mixed
-
datastore entry to delete
Return values
void —fetch()
Fetches the contents of the datastore from WinCache
public
fetch(mixed $items) : void
Parameters
- $items : mixed
Return values
void —get_value()
public
get_value(mixed $title) : mixed
Parameters
- $title : mixed
Tags
Return values
mixed —getKeys()
Get the list of all datastore keys
public
getKeys() : array<string|int, mixed>
Return values
array<string|int, mixed> —-- string array of titles of the datastore keys stored.
getOption()
public
getOption(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —getValue()
public
getValue(mixed $title) : mixed
Parameters
- $title : mixed
Return values
mixed —init_registry()
Temporary function to manage initializing the legacy registry from the datastore
public
init_registry() : mixed
Tags
Return values
mixed —preload()
Set an array of items that should be preloaded. These will not be loaded immediately but will be fetched on the first call to getValue.
public
preload(array<string|int, mixed> $titles) : mixed
Parameters
- $titles : array<string|int, mixed>
Return values
mixed —registerCount()
public
registerCount() : mixed
Return values
mixed —resetCache()
Resets datastore cache
public
resetCache() : mixed
Return values
mixed —setOption()
public
setOption(mixed $name, mixed $value[, mixed $save = true ]) : mixed
Parameters
- $name : mixed
- $value : mixed
- $save : mixed = true
Return values
mixed —setValue()
This method is intended only for unit testing. Do NOT use it in other context.
public
setValue(string $title, mixed $value) : mixed
Parameters
- $title : string
- $value : mixed