Moving the cache registration code to Merb::BootLoader.after_app_loads in init.rb worked. I wasted a lot of time trying to figure this out on my own. I think this should have been documented, especially when the skeleton app generated by merb-gen adds the registration of default cache to Gemfile prompting user to modify it in place to make other caching stores to work.
Amit On Oct 8, 1:04 pm, Amit <[email protected]> wrote: > I recently upgraded to Merb 1.1 and am not able to get caching to work > ever since. I want to use memcached store. This is what I do currently > - > > In Gemfile, I have the following lines to register cache store - > > gem("merb-cache", merb_gems_version) do > Merb::Cache.setup do > register(:memcached, > Merb::Cache::MemcachedStore, :namespace => "my_app", :servers => > ["127.0.0.1:11211"]) > end > end > > And in my controller, I'm just tring to check if the entry exists in > cache using the following line - > > if Merb::Cache[:memcached].exists?(api_name, > cache_params) > > which is resulting in following error - > > merb : worker (port 4000) ~ Could not find the :memcached store - > (Merb::Cache::StoreNotFound) > > Any idea what could be wrong? This was working perfectly in Merb > 1.0.12 where the only difference was that the cache registering > statements were in development.rb file. > > thanks > Amit --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/merb?hl=en -~----------~----~----~----~------~----~------~--~---
