Cache
[ class tree: Cache ] [ index: Cache ] [ all elements ]

Class: Cache_Container_msession

Source Location: /Cache-1.5.7/Cache/Container/msession.php

Class Overview

Cache_Container
   |
   --Cache_Container_msession

Stores cache contents in msessions.


Author(s):

Version:

  • $Id: msession.php 316194 2011-09-05 20:35:25Z cweiske $

Variables

Methods


Inherited Variables

Inherited Methods

Class: Cache_Container

Cache_Container::decode()
Decodes the data from the storage container.
Cache_Container::encode()
Encodes the data for the storage container.
Cache_Container::fetch()
Fetches a dataset from the storage medium.
Cache_Container::flush()
Flushes the cache - removes all caches datasets from the cache.
Cache_Container::flushPreload()
Flushes the internal preload buffer.
Cache_Container::garbageCollection()
Starts the garbage collection.
Cache_Container::getAllowedOptions()
Getter to allowed Configurations Options
Cache_Container::getExpiresAbsolute()
Translates human readable/relative times in unixtime
Cache_Container::getUserdata()
Returns the userdata field of a cached data set.
Cache_Container::hasBeenSet()
Verify that a configuration option has been set
Cache_Container::idExists()
Checks if a dataset exists.
Cache_Container::isCached()
Checks if a dataset is cached.
Cache_Container::isExpired()
Checks if a dataset is expired.
Cache_Container::load()
Loads a dataset from the cache.
Cache_Container::preload()
Does a speculative preload of a dataset
Cache_Container::remove()
Removes a dataset.
Cache_Container::save()
Stores a dataset.
Cache_Container::setAllowedOptions()
Set the Allowed Parameters to Container Type
Cache_Container::setOptions()
Imports the requested datafields as object variables if allowed

Class Details

[line 30]
Stores cache contents in msessions.

WARNING: experimental, untested

  • Author: Ulf Wendel <ulf.wendel@phpdoc.de>
  • Version: $Id: msession.php 316194 2011-09-05 20:35:25Z cweiske $


[ Top ]


Class Variables

$connect =  true

[line 57]

Establish a connection to a msession server?

Type:   boolean


[ Top ]

$host =  null

[line 65]

msession host

Type:   string


[ Top ]

$id_length =  32

[line 41]

Length of the Cache-Identifier

Note that the PEAR-Cache prefixes the ID with an md5() value of the cache-group. A good value for the id_length depends on the maximum number of entries per cache group.


Type:   int


[ Top ]

$ms =  null

[line 81]

mesession server connection
  • Var: msession

Type:   resource


[ Top ]

$port =  null

[line 73]

msession port

Type:   string


[ Top ]

$uniq =  true

[line 49]

Use msession_uniq to create a unique SID.

Type:   boolean


[ Top ]



Method Detail

Cache_Container_msession (Constructor)   [line 84]

Cache_Container_msession Cache_Container_msession( [ $options = ''])


Parameters:

   $options   — 

[ Top ]

fetch   [line 108]

void fetch( $id, $group)


Overrides Cache_Container::fetch() (Fetches a dataset from the storage medium.)

Parameters:

   $id   — 
   $group   — 

[ Top ]

flush   [line 182]

void flush( $group)


Overrides Cache_Container::flush() (Flushes the cache - removes all caches datasets from the cache.)

Parameters:

   $group   — 

[ Top ]

garbageCollection   [line 210]

void garbageCollection( integer $maxlifetime)

Deletes all expired files.

Note: garbage collection should cause lot's of network traffic.

  • Throws: Cache_Error

Overrides Cache_Container::garbageCollection() (Starts the garbage collection.)

Parameters:

integer   $maxlifetime   —  Maximum lifetime in seconds of an no longer used/touched entry

[ Top ]

idExists   [line 197]

void idExists( $id, $group)


Overrides Cache_Container::idExists() (Checks if a dataset exists.)

Parameters:

   $id   — 
   $group   — 

[ Top ]

remove   [line 176]

void remove( $id, $group)


Overrides Cache_Container::remove() (Removes a dataset.)

Parameters:

   $id   — 
   $group   — 

[ Top ]

save   [line 125]

void save( $id, $cachedata, $expires, $group, $userdata)

Stores a dataset.

WARNING: If you supply userdata it must not contain any linebreaks, otherwise it will break the filestructure.


Overrides Cache_Container::save() (Stores a dataset.)

Parameters:

   $id   — 
   $cachedata   — 
   $expires   — 
   $group   — 
   $userdata   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:44:50 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.