cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

[NFR] cache exist function

Open kenjikobe opened this issue 14 years ago • 5 comments

add a way to check if a key exists in the cache without get the contents of it

kenjikobe avatar Sep 13 '12 06:09 kenjikobe

something like $cache->exists("key") or $cache->has("key")

kenjikobe avatar Sep 13 '12 06:09 kenjikobe

This will be addressed in 0.6.0

ghost avatar Sep 19 '12 03:09 ghost

@phalcon I'm currently working on exists() method implementation. See the commit at my own fork at https://github.com/hdogan/cphalcon/commit/94e07b0d0ae60d5245908eea30f6a5563e000f61

Please let me know if my implementation needs changes. I haven't done functional test yet but it compiles clearly on OSX. I'll try to complete it by tomorrow.

Update: Code cleanup: https://github.com/hdogan/cphalcon/commit/fdfc772fe622f62cb7c9b96214d94695f0944726

hdogan avatar Oct 17 '12 19:10 hdogan

PR is already merged. This issue can be closed.

hdogan avatar Oct 18 '12 15:10 hdogan

thanks!

ghost avatar Oct 19 '12 17:10 ghost