michaelkoper / memcache_store_with_delete_groups Goto Github PK
View Code? Open in Web Editor NEWRails 2.1 to Rails 2.3 memcached store with extra features like deleting groups of memcached elements
Rails 2.1 to Rails 2.3 memcached store with extra features like deleting groups of memcached elements
MemCache Store with delete groups ================ Author: Michael Koper. = Description If you're using default Memcache store provided by Rails (2.1) you're probably missing functionality like delete_matched() to clear cache with Regex. This plugin is implementing some kind of feature but not with Regex but with groups. A regex solution will be very slow with a lot of requests. Because of speed reasons this plugin does not use delete_matched but delete_type. It's possible to delete groups of cache in 1 call. It's not memcache implementation but simple Ruby code to provide this functionality. This plugin is well tested on a server with more then 600 requests a minute and with 8 memcached servers combined. This plugin fixes the known errors like 'undefined class module ClassName' as well. = Installation with Rails > 2.1 script/plugin install git://github.com/michaelkoper/memcache_store_with_delete_groups.git = Usage To fetch groups called pages: Rails.cache.fetch([:pages, 1], :delete_type => true) { "page 1" } Rails.cache.fetch([:pages, 2], :delete_type => true) { "page 2" } Rails.cache.fetch([:pages, 3], :delete_type => true) { "page 3" } To delete all the pages: Rails.cache.delete_type(:pages) = Requirements - Memcache - memcache-client gem I stole the idea and some code from this repostiroy: git://github.com/martincik/memcache_store_with_delete_matched.git So some credits goes to Ladislav Martincik :-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.