# How to reset Rails.cache servers? Rails.cache.reset is undefinied

**URL:** <https://www.ruby-forum.com/t/how-to-reset-rails-cache-servers-rails-cache-reset-is-undefinied/167152>\
**Category:** Rails\
**Created:** [May 4, 2009, 8:05pm UTC](https://www.ruby-forum.com/t/how-to-reset-rails-cache-servers-rails-cache-reset-is-undefinied/167152 "2009-05-04T20:05:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kineticac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e480ec/32.png) [@kineticac](https://www.ruby-forum.com/u/kineticac)\
**Post date:** [May 4, 2009, 8:05pm UTC](https://www.ruby-forum.com/t/how-to-reset-rails-cache-servers-rails-cache-reset-is-undefinied/167152/1 "2009-05-04T20:05:41Z")

</div>

I’m trying to get memcached working for my rails app that’s running  
under passenger. Apparently we need to check if passenger forked  
memcached, and if so we need to establish a new connection using a  
reset function.

I’ve seen people install cache\_fu and they’re able to call  
CACHE.reset. But for the built in memcache-client in Rails 2.x  
there’s no such Rails.cache.reset.

What is the equivalent to this? Do I need to install cache\_fu?

everything works great on my dev machine with memcached running with  
mongrels.

---

<div class="post-metadata">

**Author:** ![kineticac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e480ec/32.png) [@kineticac](https://www.ruby-forum.com/u/kineticac)\
**Post date:** [May 5, 2009, 6:37pm UTC](https://www.ruby-forum.com/t/how-to-reset-rails-cache-servers-rails-cache-reset-is-undefinied/167152/2 "2009-05-05T18:37:19Z")

</div>

With Rails 2.3.2, use Rails.cache.clear

I’m not sure about older versions, though.

---

<div class="post-metadata">

**Author:** ![kineticac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e480ec/32.png) [@kineticac](https://www.ruby-forum.com/u/kineticac)\
**Post date:** [May 5, 2009, 6:39pm UTC](https://www.ruby-forum.com/t/how-to-reset-rails-cache-servers-rails-cache-reset-is-undefinied/167152/3 "2009-05-05T18:39:08Z")

</div>

Are you looking for Rails.cache.clear ?
