Ludo you're a hacker - gotta love it.
Josef - appreciate the input. I've been thinking along similar lines.
Josh - Thanks I'll play with that. I suspect the output will exceed
the maximum size - but worth a look.
Well I think that answers my question :) Maybe when one of you can't
sleep you could write a one hour wonder :)
thanks for the responses folks.
On 11/06/2008, at 1:40 AM, Josef Finsel wrote:
Grant,
There are a couple of things you can do here. First is the stats
command. While it may not tell how caching is doing on an individual
basis, you can determine overall caching effectiveness.
One thing I have done to track individual caching is to create a
pair of counters, One to represent CacheHits and one to represent
CacheMisses and then incremented those in debug mode. I determine
the counters on a broad level of object type as opposed to
individual objects.
Does that help?
Josef
"If you see a whole thing - it seems that it's always beautiful.
Planets, lives... But up close a world's all dirt and rocks. And day
to day, life's a hard job, you get tired, you lose the pattern."
Ursula K. Le Guin
On Tue, Jun 10, 2008 at 11:13 AM, Grant Maxwell <[EMAIL PROTECTED]
> wrote:
thanks for the really fast response folks.
I want it mostly for auditing, health checking and keeping an eye on
the cache during this early implementation phase. Being able to cast
an eye over some of our scalar entries would be particularly useful
in this regard. If we could access the cache we could create
summarised data usage reports and develop a sense of how the cache
looks over time (trends) which would be better than just the stats.
For example we have a scalar list with a counter. We just look to
see if the counter exists and if it does we increment it. But the
keys are (except for the prefix) dynamic and so we can't have a
program which looks at the cache data (without knowing the keys) to
generate a normal curve for the specific key hits. I know there are
other ways to do this but I think the cache is the logical place to
get the info from. Being able to analyze some of this data will also
help us to learn about what is effective to have in the cache and
what is not.
regards
Grant Maxwell
On 11/06/2008, at 12:56 AM, Robert Swarthout wrote:
As far as I know there is not a way to dump the contents of the
cache even by using a prefix of the key.
-Robert
On 6/10/08 10:50 AM, "Grant Maxwell" <[EMAIL PROTECTED]>
wrote:
Hi again
A bit more on this - Even if I could match a partial key. All my
keys start as some string for example "ACA:mykey". If I could
extract all "ACA:" type keys that would be very helpful. Almost all
my keys/values are scalars.
thanks
Grant Maxwell
P <mailto:[EMAIL PROTECTED]> please consider the environment
before printing this e-mail
On 11/06/2008, at 12:45 AM, Grant Maxwell wrote:
Hi folks
I am a new user for memcached - love it already. We are
experiencing a better than expected hit rate. This is reducing load
on sql and dns RBL lookups across several machines. Magic.
Could you let me know if it is possible to dump out the contents of
the cache ? I tried the following but without success. I thought it
might return a hash of it all.
my $memd = new Cache::Memcached {
'servers' => [ "localhost:11211" ],
'debug' => 0,
namespace => 'myCache:'
};
my $cache=$memd->get('myCache');
print Dumper $cache;
Just a point here - I have been programming in various languages
for 20+ years but perl is new to me so I might be overlooking an
obvious :).
regards
Grant Maxwell
P <mailto:[EMAIL PROTECTED]> please consider the environment
before printing this e-mail