Overview

Namespaces

  • Genetsis
    • core
      • activityid
      • user
  • None

Classes

  • AccessToken
  • ClientToken
  • Encryption
  • FileCache
  • LogConfig
  • LoginStatus
  • LoginStatusType
  • OAuth
  • OAuthConfig
  • OauthTemplate
  • RefreshToken
  • Request
  • StoredToken
  • Things
  • User

Interfaces

  • iTokenTypes

Exceptions

  • InvalidGrantException
  • Overview
  • Namespace
  • Class

Class FileCache

This class is used to Cache Data stored in File

Namespace: Genetsis\core
Package: Genetsis
Category: Helper
Version: 1.0
Located at core/FileCache.php
Methods summary
public static
# init( string $path, string $pref = '' )

Parameters

$path
The full path to store cache.
$pref

Throws

Exception
If there is an error.
public static
# set( string $key, mixed $data = false, integer $ttl = 3600 )

Saves data to the cache. Anything that evaluates to FALSE, NULL, '', 0 will not be saved.

Saves data to the cache. Anything that evaluates to FALSE, NULL, '', 0 will not be saved.

Parameters

$key
An identifier for the data.
$data
The data to be saved.
$ttl
Lifetime of the stored data. In seconds.

Returns

boolean TRUE on success, FALSE otherwise.
public static
# get( string $key )

Reads the data from the cache.

Reads the data from the cache.

Parameters

$key
An identifier for the data.

Returns

mixed Data that was stored or FALSE on error.
public static boolean
# delete( string $key )

Removes a key, regardless of its expiry time.

Removes a key, regardless of its expiry time.

Parameters

$key
The identifier to be deleted.

Returns

boolean
TRUE on success, FALSE otherwise.
public static boolean
# deleteCache( )

Cleans file cache.

Cleans file cache.

Returns

boolean
TRUE on success, FALSE otherwise.
public
# getError( )

Reads and clears the internal error.

Reads and clears the internal error.

Returns

string Text of the error raised by the last process.
public
# haveError( )

Can be used to inspect internal error.

Can be used to inspect internal error.

Returns

boolean TRUE if we have an error, FALSE otherwise.
Properties summary
protected static string $cache_dir

Full path to the folder where cache will be stored.

Full path to the folder where cache will be stored.

# ''
protected static string $error

Holds the last error generated.

Holds the last error generated.

# null
protected static string $prefix

Prefix to be added to the filename.

Prefix to be added to the filename.

# ''
API documentation generated by ApiGen