public function AuthcacheP13nDatabaseKeyValueStore::set in Authenticated User Page Caching (Authcache) 7.2
Set a value in the collection with the given key.
Parameters
string $key: A key.
Overrides AuthcacheP13nKeyValueStoreInterface::set
File
- modules/
authcache_p13n/ includes/ AuthcacheP13nDatabaseKeyValueStore.inc, line 25 - Defines database based implementation of a key-value store.
Class
- AuthcacheP13nDatabaseKeyValueStore
- Database based implementation of key-value store.
Code
public function set($key, $value) {
db_merge(static::$tableName)
->key(array(
'name' => $key,
'collection' => $this->collectionName,
))
->fields(array(
'value' => serialize($value),
))
->execute();
}