sasa1977 / con_cache

ets based key/value cache with row level isolated writes and ttl support
MIT License
910 stars 71 forks source link

ConCache.update doesn't honor ttl configuration #22

Closed slashmili closed 8 years ago

slashmili commented 8 years ago

Hi,

If I create a process with ttl setting and later use ConCache.update/3 to set the value:

ConCache.update(cache, :a, fn(_) -> {:ok, 1} end)

The :a item never gets expired. Is it correct behaviour? I'll push a failing scenario

sasa1977 commented 8 years ago

This was indeed a bug, thanks for reporting. It's fixed in master through fefdd3376bc4661554f0406dccbc56f6df9027b1. I'll release 0.11.0 later today.

slashmili commented 8 years ago

Thanks for the quick fix!

sasa1977 commented 8 years ago

FYI, the new version (0.11.0) is now deployed to hex.pm

slashmili commented 8 years ago

:+1: