ScyllaDB Adapter (scyllaDb)#
Factory:
Cache::scyllaDb(string $namespace = 'default', ?object $session = null, string $keyspace = 'cachelayer', string $table = 'cachelayer_entries')
Requirements:
injected ScyllaDB/Cassandra session object exposing
execute(), orext-cassandra(for default session creation path)
Highlights:
keyspace/table-backed cache entries with namespace partitioning
schema bootstrap with
CREATE TABLE IF NOT EXISTSTTL stored as absolute timestamp in
expires
Supported injected session methods:
executeprepare(optional, used when available)
Example#
use Infocyph\CacheLayer\Cache\Cache;
$cache = Cache::scyllaDb(
namespace: 'edge',
keyspace: 'cachelayer',
table: 'cachelayer_entries',
);
$cache->set('homepage:blocks', $blocks, 45);