Skip to content

Commit

Permalink
Merge pull request #56 from Shopify/jp-fix-readme-example-for-custom-…
Browse files Browse the repository at this point in the history
…cache-ttl

Fix readme example for customizing cache TTL
  • Loading branch information
jpqy authored Jun 7, 2022
2 parents 8e4c29a + 6470d23 commit f6754c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ end
```ruby
module ResponseBank
CACHE_TTL = 30.minutes
def write_to_backing_cache_store(_env, key, payload, expires_in: CACHE_TTL)
cache_store.write(key, payload, raw: true, expires_in: expires_in)
def write_to_backing_cache_store(_env, key, payload, expires_in: nil)
cache_store.write(key, payload, raw: true, expires_in: expires_in || CACHE_TTL)
end
end
```
Expand Down

0 comments on commit f6754c9

Please sign in to comment.