Shopify / Shopify/identity_cache
Document how to expire cache manually
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 2k
- Forks
- 174
- Avg merge
- 13m
- Merged PRs (30d)
- 3
Description
sometimes i want to expire(remove) cache manually. for example,
in rails console:
val = ValueModel.fetch(1)
(and log shows like that.. SQL: select * from value_model where id = 1 limit 1)
and this record is updated at other environment(ex: raw sql from DBMS)
then, use statement again in rails console.
val2 = ValueModel.fetch(1)
and then rails console shows, cache hit, and nothing changed.
in this situation, can i expire this cache manually?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the Rails console example using ValueModel.fetch(1), then inspect the repository's existing cache documentation and public expiration behavior. Document the supported way to expire cached records manually, including the externally updated-record scenario, and verify that the example matches actual behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100