code/cache/CacheService.php
public function store($key, $value, $expiry=0) {
		if ($expiry == 0) {
			$expiry = $this->expiry;
		}
		$entry = new CacheItem();

		$entry->value = serialize($value);
		$entry->expireAt = time() + $expiry;
		$data = serialize($entry);

		$this->store->store($key, $data);

		$this->items[$key] = $entry;
	}
public function store($key, $value, $expiry=0) {
		if ($expiry == 0) {
			$expiry = $this->expiry;
		}
		$entry = new CacheItem();

		$entry->value = serialize($value);
		$entry->expireAt = time() + $expiry;
		$data = serialize($entry);

		$this->store->store($key, $data);

		$this->items[$key] = $entry;
	}
public function store ( $ key , $ value , $ expiry = 0 ) { if ( $ expiry == 0 ) { $ expiry = $ this -> expiry ; } $ entry = new CacheItem ( ) ; $ entry -> value = serialize ( $ value ) ; $ entry -> expireAt = time ( ) + $ expiry ; $ data = serialize ( $ entry ) ; $ this -> store -> store ( $ key , $ data ) ; $ this -> items [ $ key ] = $ entry ; }
Cache an item

@param string $key
@param mixed $value
@param int $expiry
How many seconds to cache this object for (no value uses the configured default)
Cache an item