IP.Board  3.3.0
classes_like_cache Class Reference

Favorites cache class. More...

Public Member Functions

 __construct ()
 create ($relId, $memberId=null)
 delete ($relId, $memberId=null)
 get ($relId, $memberId=null)
 isNowStale ($relId, $memberId=null)
 setExpiration ($seconds)

Static Public Member Functions

static getInstance ()

Protected Attributes

 $_app
 $_area
 $_expire = 0
 $cache
 $caches
 $DB
 $lang
 $member
 $memberData
 $registry
 $request
 $settings

Detailed Description

Favorites cache class.

Author:
Matt

Constructor & Destructor Documentation

Constructor

Returns:
void

Member Function Documentation

create ( relId,
memberId = null 
)

Creates/updates the relationship ID's cache

Parameters:
integer$relIdRelationship ID
integer$memberIdMember ID
Returns:
array Array of stored data
delete ( relId,
memberId = null 
)

Deletes a cache

Parameters:
mixed$relIdRelationship ID or array of IDs
integer$memberIdMember ID
Returns:
void
get ( relId,
memberId = null 
)

Fetch an item from the cache

Parameters:
integer$relIdRelationship ID
integer$memberIdMember ID
Returns:
array
static getInstance ( ) [static]

Singleton

Returns:
object
isNowStale ( relId,
memberId = null 
)

Flags a cache as stale. We choose to delete, but the cache class should make the call not the application

Parameters:
mixed$relIdRelationship ID or array of IDs
integer$memberIdMember ID
Returns:
void
setExpiration ( seconds)

Set the cache expiration

Parameters:
integer$secondsTime in seconds
Returns:
void

Field Documentation

$_app [protected]

Application key

$_area [protected]

Area key

$_expire = 0 [protected]

Cache expiration time in seconds

$registry [protected]

Registry Object Shortcuts


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables