globalis/wp-cubi-transient-cache
A lightweight WordPress transient cache helper for WP-Cubi projects. It simplifies storing, retrieving, and invalidating cached values through transients, with a clean API for managing cache keys and expiration times.
What the package actually is. globalis/wp-cubi-transient-cache is a thin abstraction layer over the WordPress Transients API (get_transient / set_transient / delete_transient), published by an agency (Globalis) as part of its WP-Cubi starter stack. It is a WordPress-runtime library, not a framework-agnostic cache library. It has no PSR-6/PSR-16 surface, no Composer-native DI integration, 2 stars, 0 dependents, and a last release of April 2023.
Architecture fit: poor. Laravel's caching contract is Illuminate\Contracts\Cache\Repository, backed by drivers (Redis, Memcached, database, file, array) and offering tags, atomic locks, and Cache::remember stampede handling. This package sits on top of a global-function API that depends on WordPress core being bootstrapped ($wpdb, the wp_options table, and the transients object-cache group). There is no seam where it composes into Laravel's container, and its storage semantics are WordPress-shaped, not PSR-shaped. Adopting it means importing WordPress's runtime assumptions into a Laravel process — a large architectural concession for a library that does not even implement a standard interface.
Integration feasibility: marginal, and only via paths that make the library redundant. Two patterns exist:
johnpbloch/wordpress-core) so the global functions resolve. This drags in global state, a second DB connection via $wpdb, competing error/exception handlers, and autoloading conflicts. High cost, high blast radius, for a cache primitive Laravel already provides._transient_{key}, _transient_timeout_{key}), which means reimplementing the access layer in Laravel anyway. The library only works when WP is loaded; when WP is loaded, you don't need Laravel's cache.Technical risk: high.
wp_options rows (value + timeout) unless a persistent object-cache drop-in is present; non-expiring transients are autoloaded and bloat every page's option payload. get_transient returns false on both miss and stored-false, so miss/hit distinctions are ambiguous unless the wrapper compensates.wp_options.option_name is 191 chars and the _transient_timeout_ prefix consumes 19, leaving ~172 effective characters; namespace/group semantics are unverified.Key questions to resolve before any spend:
CacheInterface adapter, or a bespoke API? (If bespoke, integration cost doubles.)autoload flag on option writes?Stack fit: not recommended as a dependency. For a Laravel/PHP product, the target capability — a persistent cache with TTL, namespacing, and safe invalidation — is already served natively by Laravel's cache layer with Redis: tags for grouped invalidation, Cache::lock for stampede and concurrency control, PSR-16 compliance for third-party interoperability, and first-class observability. Introducing this package trades that for a WordPress runtime dependency and a copyleft license.
Recommended approach: reference, not dependency.
Illuminate\Contracts\Cache\Repository on Redis. Zero new dependencies, zero license surface, native test tooling (Cache::spy, array driver in CI).WordPressTransientStore in the Laravel app that reads/writes the shared Redis instance using WordPress's documented key format. This is an independent implementation of a public contract, avoids GPL linkage, avoids bootstrapping WordPress, and keeps the failure domain inside your own code.Migration path. There is nothing to migrate — 0 dependents and no existing usage in the estate. If a prior internal service already uses it, sequence: freeze new usage → inventory call sites → replace with the Laravel repository behind the same interface → decommission the WP-side dependency in a later cycle.
Compatibility notes. Verify PHP version constraints and whether the package is namespaced/autoloadable under Composer PSR-4 before any spike. Confirm the WordPress major version floor, since transient internals (autoload handling, object-cache group behavior) have shifted across WP releases.
Sequencing.
CacheRepository interface with contract tests, run it in shadow mode against the existing WP cache for one release cycle, then cut over.Maintenance. An unmaintained dependency with a 2-star footprint transfers all maintenance risk to us. Any WordPress core change to transient internals becomes our incident, with no upstream to escalate to. The code volume is small enough that forking is technically feasible — but forking a GPL-2.0 library into a commercial Laravel product reopens the licensing question and permanently assigns us ownership of a component we did not need.
Support. No vendor SLA, no issue-triage history to calibrate response times, no community forum. Internal ramp-up cost is the real tax: engineers must understand WordPress transient semantics (dual-row options storage, autoload flags, lazy expiry, false-on-miss ambiguity) on top of Laravel cache semantics — a niche intersection that will not be broadly staffed.
Scaling. Without a persistent object-cache drop-in, transients live in wp_options, which is read heavily on every request; autoloaded non-expiring keys inflate that payload linearly with cache size. The dual-row write pattern doubles option-table churn. There is no sharding, tagging, or bulk invalidation story, and Redis eviction can desynchronize value rows from timeout rows, producing silent stale reads. Laravel's Redis cache layer, by contrast, gives us key-prefix isolation per environment, tag-based bulk invalidation, and predictable memory behavior.
Failure modes to design against.
false returned on both miss and legitimately-stored false; wrappers must use a sentinel or existence checks.Cache::lock in the Laravel layer.Ramp-up. Code-reading effort is low (small library); contextual effort is moderate-to-high (WordPress internals). Budget a 1–2 day spike, not a sprint. Given the adoption signals — 2 stars, 0 dependents, no release in two years, composite score 0.01 — the expected value of that spike is to produce a documented "do not adopt" decision with a native Laravel alternative, which is a cheap and defensible outcome.
How can I help you explore Laravel packages today?