webignition/simplytestable-pagecache-bundle
A Symfony bundle that adds page-cache integration for SimplyTestable applications, helping store and serve cached pages to reduce repeated rendering work and improve response times through standard bundle configuration.
CacheableResponseFactory::createResponse() builds a response and derives a unique cache key from a caller-supplied parameter array. That makes it a lever for latency, origin/CPU load, and infrastructure spend on read-heavy endpoints — a decision PMs usually own jointly with engineering.null, arrays, and objects implementing __toString() or JsonSerializable. The product consequence is fewer bespoke serialization helpers and less glue code per cacheable endpoint — meaningfully cheaper to roll out across many routes, and less prone to key-collision bugs caused by ad-hoc string casting.null) and multi-value params (arrays — tag lists, ID sets, filter matrices) are now first-class. Product can consider caching for search/filter/listing pages that were previously awkward to key safely, rather than restricting caching to simple, scalar-keyed routes.Consider adoption when:
Look elsewhere when:
Cache-Control, ETag, Vary, surrogate keys), not a response-factory problem. This package is complementary at best.For executives: This is a small, targeted caching component for our Laravel services. It lets us serve repeated requests from cache with keys that reflect the inputs that actually change the answer — so we can cache more of the product (filtered listings, localized and segmented views) without serving the wrong content. The expected return is lower latency and lower compute/database spend on our heaviest read paths. Release 0.2 is an ergonomics improvement, not a re-architecture: it accepts richer parameter types so engineers write less glue code per endpoint. Cost to trial is low — we can enable it behind a flag on one or two endpoints and measure hit rate and p95 latency before committing.
For engineering: The change is additive and backward compatible — createResponse()'s second argument now tolerates null, arrays, and objects exposing __toString() or JsonSerializable, removing the need to pre-serialize filter sets and value objects at every call site. Two things to verify before we depend on it: (1) that key derivation for existing call sites is byte-identical, since a silent key change means a cold cache in production; (2) that we have an explicit TTL/invalidation story, because the package derives keys but does not manage freshness. It is pre-1.0, so pin the version and keep the integration behind a thin internal wrapper so a future breaking change is a one-file swap. This does not replace CDN or edge caching — it is an application-layer complement.
How can I help you explore Laravel packages today?