Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ details.all = {
#### Caching

In-memory caching of `details` data is provided by default via the
[`lru_redux`](https://github.com/SamSaffron/lru_redux) gem. This uses an LRU
[`sin_lru_redux`](https://github.com/cadenza-tech/sin_lru_redux) gem. This uses an LRU
(least recently used) cache with a TTL (time to live) by default. This means
that values will be cached for the specified duration; if the cache's max size
is reached, cache values will be invalidated as necessary, starting with the
Expand Down
2 changes: 1 addition & 1 deletion ipinfo.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'faraday-excon', '~> 2.1'

spec.add_runtime_dependency 'json', '~> 2.1'
spec.add_runtime_dependency 'lru_redux', '~> 1.1'
spec.add_runtime_dependency 'sin_lru_redux'

spec.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(test|spec|features)/})
Expand Down
2 changes: 1 addition & 1 deletion lib/ipinfo/cache/default_cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class IPinfo::DefaultCache < IPinfo::CacheInterface
def initialize(ttl, max_size)
@cache = LruRedux::TTL::Cache.new(max_size, ttl)
@cache = LruRedux::TTL::Cache.new(max_size, ttl, true)
end

def get(key)
Expand Down