Help

LibRingCache

Libraries Login to Add Favorites
  • 0 Likes
  • World of Warcraft
  • 632 Downloads
  • Supports: 3.2.0
  • 0 Average Daily Downloads
  • Comments
  • Created 5/14/2009 6:20:47 AM
  • Updated 10/26/2009 7:46:59 AM
  • 0 Favorites
  • Project Site
  • License: GNU General Public License version 3 (GPLv3)
  • Release Type: Mature
  • Newest File: 1.5
or

About LibRingCache

LibRingCache is an implementation of a cache that selectively lets the garbage collector collect old items but keeps the newest.

See documentation for usage information.

Why would you want to use this?

Currently you might just have a simple cache table with a _mode = "kv" metatable, but that isn't the best way because when the garbage collector runs, it will collect all entries no matter how old (or recent) they are. This cache implementation will ensure that you will keep your N most recent items in the cache.

Generally spoken, LibRingCache is useful to you if you want to keep X recent items, but still have to access them by an associative value (as opposed to just an incrementing number)

Because a cache that is always empty is useless.

------------------------------------------------------------------------
r13 | watchout | 2009-10-26 12:46:51 +0000 (Mon, 26 Oct 2009) | 1 line
Changed paths:
   A /tags/1.5 (from /trunk:12)

Tagging as 1.5
------------------------------------------------------------------------
r12 | watchout | 2009-08-08 14:16:46 +0000 (Sat, 08 Aug 2009) | 1 line
Changed paths:
   M /trunk/LibRingCache-1.0.lua
   M /trunk/LibRingCache-1.0.toc

redesign of Cache:append, new type of cache: 'blackbox', blackbox allows only adding of entries but not retrieving since the key is unknown. use LRC:createBlackbox(size, feed); Cache:append is only available for blackbox caches now.
------------------------------------------------------------------------

Comments

Learn how to disable ads
Learn how to disable ads
Login to Curse

Don't have an account? Create One.

Get an epic experience with Curse Premium
  • Faster Addon Downloads
  • Premium-Only Beta Giveaways
  • Ad-Free Curse.com Experience
  • Premium Curse Client
  • and many More Features
  • Learn More »

Minecraft 3D Print Giveaway

Enter Now!