You are here

function apc_handle_key in APC - Alternative PHP Cache 5

Same name and namespace in other branches
  1. 6 apc.inc \apc_handle_key()

Return key for apc cache

Parameters

$key: The key of the data to retrieve.

$bin: The bin/silo to look in.

3 calls to apc_handle_key()
apc_handle_delete in ./apc.inc
Delete data from the apc cache
apc_handle_get in ./apc.inc
Return data from the apc cache.
apc_handle_set in ./apc.inc
Set data into apc cache. We have to keep track of the bins ourselves since apc doesn't have the concept of "bins". So we keep a lookup table hash to be able to clear a single bin via flush.

File

./apc.inc, line 242

Code

function apc_handle_key($key, $bin) {
  static $prefix;
  if (empty($prefix)) {
    $prefix = variable_get('apc_key_prefix', '');
  }
  $full_key = ($prefix ? $prefix . '-' : '') . $bin . '-' . $key;
  return urlencode($full_key);
}