mini\Mini\ApcuDrivers\SwooleTableApcuDriver class

Documentation

Documentation missing - No docblock found for this class.

Inheritance

Implements: mini\Mini\ApcuDrivers\ApcuDriverInterface

Uses Traits: mini\Mini\ApcuDrivers\ApcuDriverTrait

Properties (2)

protected Swoole\Table $table
protected Swoole\Lock $addLock

Methods (28)

Documentation missing

Fetch raw payload from Swoole\Table.

Atomic "add if not exists" (SETNX) using a coarse mutex.

Unconditional overwrite (SET).

Delete a row.

Probabilistic GC: 1 in 10,000 chance to clean expired entries.

apcu_cache_info(): here we just return something minimal and honest.

apcu_sma_info(): Swoole\Table doesn’t expose allocator details,

apcu_clear_cache(): wipe the table.

apcu_enabled(): this driver is enabled if Swoole is available.

Encode a value and its expiry into a payload string.

Decode payload into value + expiry.

Compute logical expiry from TTL.

Convert logical expiry to backend TTL.

Documentation missing

Documentation missing

Documentation missing

Documentation missing

apcu_fetch

apcu_store

apcu_delete

apcu_exists

apcu_entry

apcu_key_info (minimal)

Source

src/Mini/ApcuDrivers/SwooleTableApcuDriver.php:7-171