dalli

    5熱度

    2回答

    如何刪除鍵在memcached中與正則表達式(使用達利+ Rails)的 def expire_all expire_fragment(Regexp.new("/customers/customers")) expire_fragment(Regexp.new("/customers/customers\/")) expire_fragment(Regexp.new(

    1熱度

    2回答

    我不確定這是否可以完成。 我正在嘗試設置達利在3秒後刪除內存緩存(只是爲了實驗) dalli = Dalli::Client.new dalli.add("test1","value", 3) dalli.get("test1").should eql "value" sleep(10) dalli.get("test1").should e

    4熱度

    2回答

    我正在運行Ruby on Rails,並使用Dalli gem來訪問memcached。 問:我怎麼刪除某一範圍的鍵(不是多,而是一個範圍)的東西,如:刪除與以「USERINFO」開始,換句話說鑰匙,我怎麼可以使用通配符所有memcached的條目刪除一系列鍵?

    2熱度

    1回答

    我最近使用Dalli gem爲我的Rails應用程序實現了memcached heroku插件的緩存。我發現雖然是部署到Heroku,但它也會緩存我所有的靜態資源,包括圖像,這些資源很快就會炸燬我的memcached大小。 Heroku的日誌的樣品看起來像 cache: [GET /assets/application.css] fresh app[web.1]: cache: [GET /as

    1熱度

    1回答

    我在使用我的機架應用程序生成的Memcaching頁面生成中遇到了一些問題。 我存儲通過我的齒條的應用程序在內存緩存與(紅寶石)碼下列位產生的頁面: require 'dalli' memcached = Dalli::Client.new("localhost:11211") memcached.set(req.path_info, response[2][0]) (其中,反應[2] [

    4熱度

    1回答

    我們有一個頁面顯示了我們應用程序的頂級組。領先榜的計算是昂貴的,所以我們緩存了一個小時,結果如下: @groupboard = Rails.cache.fetch("top_groups", :expires_in => 1.hour) do Group.top_groups end 緩存已被寫入後的第一時間這是給了一個錯誤。在控制檯打探我看到Group.top_groups返回項

    1熱度

    1回答

    development.rb緩存配置 config.action_controller.perform_caching = true config.cache_store = :dalli_store, 'localhost:11211', { :namespace => APP_NAME, :expires_in => 3.month, :compress => true }

    2熱度

    1回答

    我在我的rails應用程序中使用memcache。我想說 過期的所有條目與像 '富-123- *' 其中*任何字符串鍵。當然,沒有memcache發行版直接支持(右?),因爲它的構建簡單而快速,因此它沒有索引。 有幾個項目排序是解決這個問題,通過保持鍵的本地列表: https://github.com/defconomicron/dalli-store-extensions https://git