cache~crystal-cache

A key/value store where pairs can expire after a specified interval cache filesystem expiration hacktoberfest
0.0.2 released

Caché

A key/value store where pairs can expire after a specified interval

Build Status GitHub release License

Installation

Add this to your application's shard.yml:

dependencies:
  cache:
    github: mamantoha/cache

Usage

Available stores

  • [x] Memory
  • [ ] File
  • [ ] Redis
  • [ ] MemcahedStore
require "cache"
# Set all values to expire after one minute.
cache = Cache::MemoryStore(String, String).new(expires_in: 1.minute)
cache.fetch("today") do
  Time.now.day_of_week
end

Contributing

  1. Fork it ( https://github.com/mamantoha/cache/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • mamantoha Anton Maminov - creator, maintainer
cache:
  github: crystal-cache/cache
  version: ~> 0.0.2
License MIT
Crystal 0.24.2

Authors

Dependencies 0

Development Dependencies 0

Dependents 1

Similar shards

Last synced .
search fire star recently