v0.37.0
2 November 2026
Signed-in visitors and visitors with option cookies are now served from the page, fragment and {cache} caches.
Added
persets who shares a cache entry:user(the default, one entry per signed-in user),roleorall. Write it asper: 'role'on{fragment},{component}and{cache}, or as{"cache": {"ttl": 300, "per": "role"}}in a view's_index.json.- A render is not kept when it read more than its
pershares: any session read,user()underroleorall, androle(),can()orisLoggedIn()underall. A signed-in visitor's kept page is sentprivate, no-cache. - A cached render is kept per value of each visitor option it read through
$app->options->get().Options::values()returns option values without counting them as read, andOptions::readKeys()lists the options read. SessionRoot::role()returns the role name (guestwhen signed out),SessionRoot::reads()counts identity reads andSessionRoot::audience()names who an entry is shared with.Cache::flushUser()clears the entries kept for one user.Cache::getFor()andCache::setFor()read and write an entry for an audience, andCache::per()checks apervalue.App::cacheMark()andApp::unkeepable()let code check that a render read nothing itsperdoes not share.
Changed
- A signed-in visitor no longer skips the caches.
Cache::getVaried()andCache::setVaried()take aperargument. - A visitor holding an option cookie is served cached pages. A template that reads the cookie directly instead of through
$app->options->get()now gets the shared entry. user.update:afteranduser.delete:beforeclear only the entries kept for that user.user.create:afterno longer empties the cache. A page that shows a user clears itself from auser.*hook.- The fragment cache schema is version 4, so the store is emptied once on upgrade.