tractorcow / silverstripe-dynamiccache

Simple on the fly caching of dynamic content for Silverstripe
39 stars 27 forks source link

Feature Idea: Hit/Miss logging #45

Closed sekjal closed 7 years ago

sekjal commented 8 years ago

It would be very useful to have a hit/miss ratio over time for DynamicCache, so that it can be compared to other caching solutions, and so settings can be fine tuned against actual site traffic. Rather than build-in a full dashboard, we could just use SS_Log to send a message whenever the cache is hit, missed or skipped. Individuals could then choose to add a LogWriter to store these messages in whatever way they see fit. External log analysis tools could then be leveraged to create a hit/miss ratio.

It seems like this could be done with 3 lines, an SS_Log::log() for each hit, miss or skipped header message. Does this seem like a feature worth a PR?

tractorcow commented 8 years ago

Sure go ahead. :D Maybe make sure that logging is off by default, but can be easily turned on.