Rajanikanth,
If it helps you, have a look on the library we have posted which follows
ideas out of implementation of groupcache/lru.go, adding expiring
capabilities to LRU (same logic of list indexing behind):
https://github.com/cgrates/ltcache
DanB
On Friday, July 21, 2017 at 2:01:15 AM UTC+2
Thanks for the replies.
Sameer: it would be awesome if you can open source them.
Thanks,
Rajanikanth
On Thu, Jul 20, 2017, 7:47 PM Sameer Ajmani wrote:
> We have a few implementations of this inside Google (expiring.Map,
> timedcache, and lru.Cache). It might make sense to open source these,
We have a few implementations of this inside Google (expiring.Map,
timedcache, and lru.Cache). It might make sense to open source these, if
they have no internal dependencies.
On Wed, Jul 19, 2017 at 3:22 PM Rajanikanth Jammalamadaka <
rajanika...@gmail.com> wrote:
> Does somebody have a recomme
On Wed, 19 Jul 2017 19:32:32 - Jan Mercl <0xj...@gmail.com> wrote:
>
> On Wed, Jul 19, 2017 at 9:22 PM Rajanikanth Jammalamadaka <
> rajanika...@gmail.com> wrote:
>
> > Does somebody have a recommendation for an expiring dict? If I have to
> > write my own, is there a way to avoid iterating o
A queue of keys stamped with the creation timestamp allows for dropping
elements from the front easily. This makes the expiration cheap, but pays
in memory resources. Jan's suggestion is subtly cheaper from a memory
perspective, but pays with a bit more CPU cycles. Since this is just a
simple queue
Thanks Shawn/Jan
On Wednesday, July 19, 2017 at 3:32:59 PM UTC-4, Jan Mercl wrote:
>
>
> On Wed, Jul 19, 2017 at 9:22 PM Rajanikanth Jammalamadaka <
> rajan...@gmail.com > wrote:
>
> > Does somebody have a recommendation for an expiring dict? If I have to
> write my own, is there a way to avoid i
On Wed, Jul 19, 2017 at 9:22 PM Rajanikanth Jammalamadaka <
rajanika...@gmail.com> wrote:
> Does somebody have a recommendation for an expiring dict? If I have to
write my own, is there a way to avoid iterating over all the keys to delete
the expired entries?
Common approach is to tag the entries
On Wed, Jul 19, 2017 at 3:22 PM, Rajanikanth Jammalamadaka <
rajanika...@gmail.com> wrote:
> Does somebody have a recommendation for an expiring dict? If I have to
> write my own, is there a way to avoid iterating over all the keys to delete
> the expired entries?
>
>
>
It's not expensive to get a
Does somebody have a recommendation for an expiring dict? If I have to
write my own, is there a way to avoid iterating over all the keys to delete
the expired entries?
Thanks,
Raj
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe