Overview

Namespaces

  • Apptus
    • ESales
      • Connector
        • Report
        • Time
    • Util
      • Cache
  • PHP

Classes

  • ApcStateCache
  • ArrayStateCache
  • MemcachedStateCache
  • MemcacheStateCache
  • NoStateCache
  • PrefixStateCache
  • SQLite3StateCache

Interfaces

  • StateCache
  • Overview
  • Namespace
  • Class
  • Tree

Class SQLite3StateCache

Interface for a key based string cache.

Apptus\Util\Cache\SQLite3StateCache implements Apptus\Util\Cache\StateCache
Namespace: Apptus\Util\Cache
Located at SQLite3StateCache.php
Methods summary
public static boolean|string
# testSQLite( string $filename, string $key = 'sqlitetest', string $value = 'sqlitetest' )

Test if SQLite3 is working correctly.

Test if SQLite3 is working correctly.

Parameters

$filename
and filename of database to test.
$key
to test with. Defaults to "sqlitetest".
$value
to test with. Defaults to "sqlitetest".

Returns

boolean|string
True on success, or a string with what went wrong on failure.
public
# __construct( $filename )
public boolean
# add( string $key, string $value, integer $expire )

Add a non-existing entry to the cache.

Add a non-existing entry to the cache.

Parameters

$key
$value
$expire
maximum time, in seconds, this entry will be in the cache.

Returns

boolean
True on success, false on failure. Returns false if the key already exists.

Implementation of

Apptus\Util\Cache\StateCache::add()
public boolean
# delete( string $key )

Remove an entry from the cache.

Remove an entry from the cache.

Parameters

$key

Returns

boolean
True on success, false on failure.

Implementation of

Apptus\Util\Cache\StateCache::delete()
public boolean|string
# get( string $key )

Get an entry from the cache.

Get an entry from the cache.

Parameters

$key

Returns

boolean|string
Value as a string or false if key was not found.

Implementation of

Apptus\Util\Cache\StateCache::get()
public array
# getMulti( array $keys )

Get several entries from the cache.

Get several entries from the cache.

Parameters

$keys
indexed array with the keys that should be fetched from the cache.

Returns

array
An associative array of key => value pairs for all keys found.

Implementation of

Apptus\Util\Cache\StateCache::getMulti()
public boolean
# replace( string $key, string $value, integer $expire )

Replace an existing entry in the cache.

Replace an existing entry in the cache.

Parameters

$key
$value
$expire
maximum time, in seconds, this entry will be in the cache.

Returns

boolean
True on success, false on failure. Return false if key does not already exist.

Implementation of

Apptus\Util\Cache\StateCache::replace()
public boolean
# set( string $key, string $value, integer $expire )

Set an entry in the cache.

Set an entry in the cache.

Parameters

$key
$value
$expire
maximum time, in seconds, this entry will be in the cache.

Returns

boolean
True on success, false on failure.

Implementation of

Apptus\Util\Cache\StateCache::set()
public boolean
# setMulti( array $items, integer $expire )

Set several entries in the cache.

Set several entries in the cache.

Parameters

$items
associative array of key => value pairs.
$expire
maximum time, in seconds, these entries will be in the cache.

Returns

boolean
True on success, false on failure.

Implementation of

Apptus\Util\Cache\StateCache::setMulti()
Apptus ESales Connector PHP API documentation generated by ApiGen