This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
README | Tue Jul 15 18:54:25 -0700 2008 | [jamescook] |
| |
active_support_hook.rb | Mon Jul 14 19:24:42 -0700 2008 | [jamescook] |
| |
keys.rb | Tue Jul 15 18:54:25 -0700 2008 | [jamescook] |
README
-- This ruby script add a 'keys' method to inspect the key names for an instance of MemCache.
-- Internally, a separate KEYS hash is created to store the key names
-- In addition, the script uses the 'keys' method to serialize/deserialize data. AWESOME!!!
Example usage:
--> CACHE = MemCache.new
--> CACHE.servers = 'localhost:1337'
--> CACHE.set('test', 'ABCDEF')
=#> nil
--> CACHE.keys
=#> [:test]
--> CACHE.delete('test')
=#> "DELETED\r\n"
--> CACHE.keys
=#> []
-- Oh you want to save your objects to disk?
--> cache = CACHE.serialize
=#> "\004\b{\v:\ntest6o:\rMemCache\f:\021@multithreadF:\r@servers[\000:\016@readonlyF:\022@servers_hash
[\006\"\023localhost:1337:\r@buckets[\000:\017@namespace0:\023@alt_namespace\"\021keys_3015770:\ttest@\006:\ntest1@\006\
"
\022server_string@\b:\ntest2@\006:\ntest5@\006"
-- Pretend we wrote that to a file ..
--> NEWCACHE = MemCache.load_instance(File.read('my_cached_data'))
=#> <MemCache: 1 servers, 1 buckets, ns: nil, ro: false>
--> NEWCACHE.keys
=#> [:test]
-- TODO: Handle all the attributes when serializing ..



