Well it depends. If you've just started up an application, you may have
a hit/miss ratio that's close to 50/50 because the app will go to check
for cache and not find it (miss), then generate the cache and return it
(hit). If the app's been running for a little bit and you've been
hitting it regularly, then a 50/50-ish ratio could mean several
different things. Most of the things I can think of are things you'd likely
want to change.
One thing it might mean is that your application is holding on to
strong-references (pointers) to your cache objects externally (outside
the cachebox agent or service). The reason you wouldn't want that is
because that eliminates the ability of the service to effectively cull
or reap the cache for memory management.
Something else it might mean is that the application is attempting to
fetch cache for a lot of things that simply don't exist and therefore
will never be cached in the first place. I noticed when I was updating
the onTap framework that some caching I was using for file-system
activities were doing this, where it would look for cache for files or
directories that didn't exist. So when it went to find the cache it
would record the miss, but then it wouldn't have any content to cache
and it would just be left in the cache metadata as a miss, collecting
miss counts. In some cases that may be okay, but if your application is
doing a lot of that, then you might want to find some way to test first
before fetching cache that it knows won't be there. In my case I simply
performed a directoryexists() or fileexists() and if they didn't, then I
returned that info without caching. If this is happening, you'll see the
miss-counters when you browse the content of your agent -- they'll be
gray where the rest of the cached content (the hits) will be normal
colors.
I could swear I had one or two other scenarios in mind a minute ago, but
they seem to have left me. ;) Anyway I think these two are probably the
most likely reasons for the lower ratio.
--
s. isaac dealey :: AutLabs
Creating meaningful employment for people with Autism
http://www.autlabs.com
ph: 817.385.0301
http://onTap.riaforge.org/blog