luckyframework / luckyframework/avram
Cache pollution across requests in development
- Dominant language
- Crystal
- Stars
- 183
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
I'm seeing cache objects bleed over between requests on Avram release v0.22.0 with query cache enabled. This might be related to #803. I disabled turbolinks to validate there was nothing strange happening on the front end, but the issue persists.
I don't have a lot of clever code going on. It's a server rendered page, traditional form submits, etc. Nothing fancy.
This sequence repeatedly produces ghost artifacts:
GET resource/:id/subresource_index
DELETE subresource/:id -> 301 redirect to resource/:id/subresource_index
GET resource/:id/subresource_index
To be a little more concrete:
GET posts/:id/comments
DELETE comment/:id -> 301 redirect to posts/:id/comments
GET posts/:id/comments
The second index fetch will reliably still have the deleted comment. Frequently the comment persists until the server recompiles.
Contributor guide
Research direction
Start with Avram's query-cache handling across the request lifecycle and compare the symptoms with issue #803. Reproduce the listed GET/DELETE/redirect/GET sequence using posts and comments, then trace why the second fetch retains the deleted comment. Done means the fresh request no longer shows the deleted record without waiting for a server recompile.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100