Download the PHP package se7enxweb/sevenx_valkey_cache without Composer
On this page you can find all versions of the php package se7enxweb/sevenx_valkey_cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download se7enxweb/sevenx_valkey_cache
More information about se7enxweb/sevenx_valkey_cache
Files in se7enxweb/sevenx_valkey_cache
Package sevenx_valkey_cache
Short Description Redis/Valkey backed cache handler for Exponential / eZ Publish Legacy. Replaces disk file storage for template blocks and content view caches.
License GPL-2.0-or-later
Homepage https://se7enx.com
Informations about the package sevenx_valkey_cache
sevenx_valkey_cache
A Redis/Valkey backed cache handler for Exponential 6.0.15 or later.
It replaces disk file storage for:
{valkey-block ...}template blocks- content
content/viewfull view cache - compiled
eZINIcache files
Cache entries are stored in Redis/Valkey with TTL based expiry, generation locks and reverse node / subtree indexes so that publishing content selectively purges the affected cache entries.
License
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
See the LICENSE file or http://www.gnu.org/licenses/ for the full license
text.
Author
Developed and maintained by 7x — https://se7enx.com
Requirements
- Exponential 6.0.15 or later
- PHP redis or igbinary extension (php-redis is recommended)
- A running Redis or Valkey server reachable from the web server
Kernel integration
Exponential 6.0.15 is expected to ship the kernel hooks this extension needs:
kernel/content/view.phpcallssevenxValkeyCacheBlockfor the content view cache.lib/ezutils/classes/ezini.phpcallssevenxValkeyINICachefromloadCache(),saveCache()andresetCache()for compiled INI arrays.
If the kernel does not yet contain these calls, the same hooks can be applied
as a manual patch. The current rollout (which kernels are already patched) is
tracked in /root/bin/doc/SEVENX_VALKEY_CACHE_ROLLOUT.md.
Installation
Manual install
-
Copy or checkout the extension into
extension/sevenx_valkey_cache. -
Make the extension active in
settings/override/site.ini.append.php: -
Regenerate autoloads:
- (Optional) Clear caches:
Composer install
Then activate the extension and regenerate autoloads as described above.
Configuration
Configure the Redis/Valkey connection in settings/override/valkeycache.ini.append.php:
Content view cache
In Exponential 6.0.15 kernel/content/view.php uses sevenxValkeyCacheBlock
for the content view cache backend. This stores full view results in
Redis/Valkey instead of disk and dramatically reduces render time for cached
nodes.
Compiled INI cache
Exponential 6.0.15 adds eZINI hooks that let the extension store compiled INI
arrays in Redis/Valkey through sevenxValkeyINICache. This removes the
per-request var/cache/ini/*.php disk touches and makes INI caches
cluster-safe.
To enable it, set IniCache=enabled in valkeycache.ini (shown in the
configuration example above). The extension also preloads all INI arrays used
by the current request with a single MGET.
Usage
{valkey-block} template function
Use {valkey-block} anywhere you would use the built-in {cache-block} but want
the rendered output stored in Redis/Valkey.
Parameters:
expiry— TTL in seconds (default 7200).subtree_expiry— Node id to use as a subtree dependency. When any node under this subtree changes, the block is purged.node_expiry— Node id to use as a node dependency. When the node changes, the block is purged.keys— Additional cache key components (array or scalar).lock— Use generation locks to avoid cache stampedes (defaulttrue).ignore_content_expiry— Iftrue, ignore the globaltemplate-block-cacheandglobal-template-block-cacheexpiry timestamps.
Manual cache management
The sevenxValkeyCacheBlock singleton can be used directly in custom code:
Static cache handler
sevenxValkeyCacheHandler is registered as ContentSettings.StaticCacheHandler.
It is invoked when content changes and purges the Redis/Valkey view cache and
block cache entries that are indexed by the affected node ids and their
ancestors.
Implementation notes
The extension deliberately follows the architecture of the mugo_memcache
proof-of-concept: a lightweight cache block class, a static cache handler for
selective purging, a template function for block caching, a kernel/content/view.php
content view cache integration, and a sevenxValkeyINICache backend for compiled
INI caches. The storage backend has been changed from Memcache to Redis/Valkey,
with added support for TTL based expiry, atomic generation locks, and
node/subtree reverse indexes without requiring a relational database.
Current rollout
As of 2026-07-20, sevenx_valkey_cache is installed and active on the following
Exponential/eZ Publish docroots:
alpha.se7enx.com—/var/www/vhosts/alpha.se7enx.com/doc/alpha.se7enx.comedit.alpha.se7enx.com—/var/www/vhosts/alpha.se7enx.com/doc/edit.alpha.se7enx.com
All other *.se7enx.com, *.ezpublish.se7enx.com, *.exponential.earth and
related eZ installations do not yet have the extension or the required kernel
hooks. The full rollout status (including kernel patch state per docroot) is
tracked in /root/bin/doc/SEVENX_VALKEY_CACHE_ROLLOUT.md.