Solar_Cache_Adapter_Session::_fetchOrInsert()

protected mixed Solar_Cache_Adapter_Session::_fetchOrInsert ( string $method , string $key , callback $callback , array $args = NULL , int $life = NULL )

Support method for fetchOrSave() and fetchOrAdd().

Inherited from Solar_Cache_Adapter.

Parameters

  • (string) $method: The method to use for inserting created data, typically 'add' or 'save'.

  • (string) $key: The entry ID.

  • (callback) $callback: A PHP callback to use if the data needs to be created for insert.

  • (array) $args: Arguments to the callback, if any.

  • (int) $life: A custom lifespan, in seconds, for the entry; if null, uses the default lifespan for the adapter instance.

Returns

  • (mixed) The fetched or created data.

Description

Support method for fetchOrSave() and fetchOrAdd().

See Also



Local