Cache Enhancement: custom Item Types

Luis, here's an enhancement request for the cache manager that is
purely a management/reporting feature.

I was admiring how the cache debug panel gave me a nice little pie
chart showing the break down of item types-- i.e. handlers, events,
views, etc. The problem is, the stuff I am most interested in is all
the big "other" category. I am using caching in my service layer for
a number of things like oft-run zip code searches, utility lookups
etc, that I know are deterministic or will always return the same
results for a given set up inputs. It would be nice to see a break
down of the different types of things I am caching that are specfic to
my application.

Your current getItemTypes() method in CacheManager searches a for a
static list of item types based on the cache key prefixes they use.
It would be nice to register custom item types with the cache manager
when the app starts up. I would provide a display name and a token
that would be included in the cache key for all items of that type.
The cache manager would then keep a list of registered types, and when
getItemTypes() was called it would dynamically match up the cache keys
with the registered list of item types and their cache key prefixes.

Additionally, CachePanel.cfm and CacheCharting.cfm would simply loop
over all the keys in the itemTypes struct instead of hardcoding the
current options.

Like I said, this would really be a feature to enhance the reporting
of cache usage, but I think it would be fairly easy to implement. If
you want, I'll take a whack at it and send you the code.



By all means Brad, go for it and let me know how best to achieve this. Maybe we can keep this thread for brainstorming on how to achieve this.