Document how to expire cache manually

Open
#445 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby

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.

Description

documentation

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?

Dominant language
Ruby
Stars
2k
Forks
174
Avg merge
13m
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Shopify/identity_cache

All issues in Shopify/identity_cache

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.