Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/58.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 如何使用regex删除memcached中的密钥(使用Dalli+;RoR)。_Ruby On Rails_Ruby_Memcached_Ruby On Rails 3.2_Dalli - Fatal编程技术网

Ruby on rails 如何使用regex删除memcached中的密钥(使用Dalli+;RoR)。

Ruby on rails 如何使用regex删除memcached中的密钥(使用Dalli+;RoR)。,ruby-on-rails,ruby,memcached,ruby-on-rails-3.2,dalli,Ruby On Rails,Ruby,Memcached,Ruby On Rails 3.2,Dalli,如何使用regex删除memcached中的密钥(使用Dalli+Rails) 不使用memcached。有什么想法吗?Memcached无法迭代其键,因此regexp过期将不起作用。看 请看一看潜在的解决方法,尽管它需要大量人力。安装gem-dalli商店扩展 在清扫车里 expire_fragment /#{Regexp.escape(restaurant.id)}\/stocks*/ dalli store extensions使用本地内存缓存,因此应用程序实例之间可能会不同步。(我认

如何使用regex删除memcached中的密钥(使用Dalli+Rails)


不使用memcached。有什么想法吗?

Memcached无法迭代其键,因此regexp过期将不起作用。看


请看一看潜在的解决方法,尽管它需要大量人力。

安装gem-dalli商店扩展

在清扫车里

expire_fragment /#{Regexp.escape(restaurant.id)}\/stocks*/

dalli store extensions使用本地内存缓存,因此应用程序实例之间可能会不同步。(我认为这就是问题所在)。请看我的问题,在写入和删除密钥时,不断序列化和反序列化密钥集也会带来严重的性能问题。
expire_fragment /#{Regexp.escape(restaurant.id)}\/stocks*/