Repository navigation
feat(cache): record cache, page cache and cache tools for public pages - #35
Merged
Merged
Conversation
xiregroup
commented
Nov 17, 2026
Contributor
- feat(cache): record cache, page cache and cache tools for public pages
- build(admin): rebuild the bundle with the cache screen
- fix(cache): drop kept sites, languages and paths on flush, drop again after commit
- test(cache): every changed line of the admin cache tested both ways
- test(cache): cached pages, questions, reviews and imports tested both ways
- fix(cache): boot writes nothing to the cache, tests run on MySQL and PostgreSQL
- test(cache): settings, debug line and card language tests hold on MySQL and PostgreSQL
xiregroup
enabled auto-merge
November 17, 2026 23:54
github-merge-queue
Bot
removed this pull request from the merge queue due to no response for status checks
Nov 18, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Nov 18, 2026
Lists ask the database only for IDs; each record comes from a per-record card, read for a whole page in one multi-get. Cards are plain arrays built from the admin fields (every language, link-field relations, SEO, pictures, the public URL, what extenders add) and are dropped on save, delete and restore, with version counters for related lists and cards. bulk() drops once after an import. Works on every Laravel store: tags on Redis and Memcached, version keys on the file and database stores. Catalog, news, pages, brands, stores, FAQ and reviews read their public lists through it, the theme keeps its record view in the card, and module settings are kept in it, so a warm list or product page runs no query. An optional page cache for visitors without a login (off by default) swaps the CSRF token on the way out, sends ETag, Last-Modified and Cache-Control for a CDN, and never keeps a page holding something made for one visitor, such as the image captcha's question. atrium:cache:warm, an admin screen with hit rate, size and clear, a debug line in local mode, the atrium.cache.stats filter for monitoring, a benchmark of 10 000 products with 40 properties on MySQL and PostgreSQL, and docs/cache.md in English and Russian.
… after commit A save inside a transaction drops the record's cards a second time once committed, so a visitor who read between the save and the commit does not keep the old row. Sites::flush(), ContentLanguages::flush() and PublicUrl::forgetPaths() now drop what the record cache keeps too; switching the current site only forgets the picked languages. Cards hydrate their model on the default connection name, so is() holds. Pages::preloadLinks() reads the fields of any model that declares them. Adds the Dusk test of the cache screen.
Tests for the record cache, its versions, cards and card builder, the cache store, the page cache, the debug line, the cache screen and the warm command, down to the last mutant. Redundant casts and wrappers that no test could tell apart are gone from the cache classes. CacheStore::size() looked up the database store as cache.stores..table when atrium.cache.store was not set; it now falls back to the default store.
… ways The theme draws cached cards the same way it draws records, the FAQ list follows its categories, reviews and page trees come from the cache, and every Bitrix import drops the whole cache at the end even when it brought nothing. Linked records in the theme are kept by class, column and value.
…PostgreSQL Wiring a module in at boot called PublicUrl::forgetPaths(), which now bumps a version in the cache store: on a fresh install with the database store, artisan and migrate died before the cache table existed, and every request wrote to the cache. Wiring, page saves and the theme's save listener forget only the paths of the request (PublicUrl::forgetMemo()); a saved section drops the kept tree by itself. The debug line lets clicks through to the page under it. The cache fixture tables live in a test migration, so persistent databases do not meet them twice, and two theme tests no longer depend on the quoting and decimals of SQLite.
…QL and PostgreSQL
xiregroup
force-pushed
the
feat/cache
branch
from
November 18, 2026 14:43
71bc41f to
2857716
Compare
xiregroup
enabled auto-merge
November 18, 2026 14:43
…oes not add a query to the counted ones
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.