Get an Epic Experience with Premium

LibRingCache

Libraries Login to Add Favorites
  • 0 Likes
  • World of Warcraft
  • 0 Monthly Downloads
  • Supports: 3.2.0
  • 738 Total Downloads
  • Updated 10/26/2009
  • Created 05/14/2009
  • 0 Favorites
  • Project Site
  • Comments
  • Release Type: Mature
  • License: GNU General Public License version 3 (GPLv3)
  • 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

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 experience
  • Premium Curse Client
  • and many More Features
  • Learn More »

Infinite Crisis NA

Get Your Preferred Access Code!