Most intelligent caches take either a size-aware or use-aware approach.
They do so by either anlysing the size of all the elements in the cache or their frequency of usage before determining which elements to drop from the cache.
Unfortunately,
the processing overhead for this logic (usually applied on insert) will often slow these caches singnificantly when frequent insertions are needed.

This module was designed address when this speed-penalty becomes a problem.
Specifically,
it is a rudimentarily size-aware cache that is optimized to be very fast.

For its size analysis,
this module merely checks the number of elements in the cache against a raw size limit.
(The default limit is 500,000) Additionally,
to aid speed,
the "size" check doesn't occur on every insertion.
Only after a count of a certain number of insertions (default 1,000) is the size check performed.
If the size limit has been exceeded,
the entire cache is purged.
(Since there is no usage analysis,
there is no other logical depreciation that can be applied)

This produces a very fast in-memory cache that you can tune to approximate size based upon your data elements.

Due to perl's methodology of allocating memory, you will not see memory freed back to general usage until perl exits after instancing this module. On each purge of the internal cache, the memory is retained by perl and reallocated internally as the cache grows again.

Consequently after the initial population and purge of the cache, the memory allocated should be of a relatively constant size.

In the name of speed, there is no checking to see if the data being stored is complex or not. Technically you should be able to store complex memory structures, though this module is not designed for it and the ability is not guarenteed.