lib/eMapper/Statement/Configuration/StatementConfiguration.php
public function cache($cache_key, $cache_ttl = 0) {
		if (!is_string($cache_key) || empty($cache_key))
			throw new \InvalidArgumentException("Cache key is not a valid string.");
		
		if (!is_integer($cache_ttl) || $cache_ttl < 0)
			throw new \InvalidArgumentException("Cache TTL is not a valid integer.");
	
		return $this->merge(['cache.key' => $cache_key, 'cache.ttl' => $cache_ttl]);
	}
public function cache($cache_key, $cache_ttl = 0) {
		if (!is_string($cache_key) || empty($cache_key))
			throw new \InvalidArgumentException("Cache key is not a valid string.");
		
		if (!is_integer($cache_ttl) || $cache_ttl < 0)
			throw new \InvalidArgumentException("Cache TTL is not a valid integer.");
	
		return $this->merge(['cache.key' => $cache_key, 'cache.ttl' => $cache_ttl]);
	}
public function cache ( $ cache_key , $ cache_ttl = 0 ) { if ( ! is_string ( $ cache_key ) || empty ( $ cache_key ) ) throw new \ InvalidArgumentException ( "Cache key is not a valid string." ) ; if ( ! is_integer ( $ cache_ttl ) || $ cache_ttl < 0 ) throw new \ InvalidArgumentException ( "Cache TTL is not a valid integer." ) ; return $ this -> merge ( [ 'cache.key' => $ cache_key , 'cache.ttl' => $ cache_ttl ] ) ; }
Sets cache key and ttl
@param string $cache_key
@param integer $cache_ttl
@throws \InvalidArgumentException
@return \eMapper\Statement\Configuration\StatementConfiguration
Sets cache key and ttl