Skip to content

Commit

Permalink
Merge branch 'initial_easycache' of github.com:malvads/easy-cache int…
Browse files Browse the repository at this point in the history
…o initial_easycache
  • Loading branch information
malvads committed Feb 27, 2024
2 parents a800ea6 + 07c388a commit 66d16ed
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ data = cache.fetch(cache_key, cache_ttl, store_in_mem) do
end
```

Now data is in-mem for the next 3600 second (store_in_mem variable is important for storing data first time), if i want to get the data stored in mem i do
Now data is in-mem for the next 3600 second (store_in_mem variable is important for storing data first time).

## Getting data

If i want to get the data stored in mem i do

```ruby
data = cache.fetch("my_key")
Expand All @@ -39,4 +43,4 @@ end

because the data is already cached, so it will not call the block, it will return the cached data instead.

This will output the cached data, remember that cached data is stored here for only 3600 seconds
This will output the cached data, remember that cached data is stored in mem for only 3600 seconds

0 comments on commit 66d16ed

Please sign in to comment.