# Custom cache store â€“ possible?

**URL:** <https://www.ruby-forum.com/t/custom-cache-store-a-possible/186083>\
**Category:** Rails\
**Created:** [March 31, 2010, 10:37am UTC](https://www.ruby-forum.com/t/custom-cache-store-a-possible/186083 "2010-03-31T10:37:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![oscar-alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/e36b37/32.png) [@oscar-alexander](https://www.ruby-forum.com/u/oscar-alexander)\
**Post date:** [March 31, 2010, 10:37am UTC](https://www.ruby-forum.com/t/custom-cache-store-a-possible/186083/1 "2010-03-31T10:37:16Z")

</div>

Hi.

I want to define my own cache store but I have no idea how to use in  
my app.

Rails initializer reads environment config before loading app  
initializers and plugins. So, i cant write:

config.cache\_store = :my\_beautiful\_cache\_store, ‘localhost:641’

even if I put ActiveSupport::Cache::MyBeautifulCacheStore in config/  
initializers.

Now i think it is impossible to define my own cache store. Am I right?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![oscar-alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/e36b37/32.png) [@oscar-alexander](https://www.ruby-forum.com/u/oscar-alexander)\
**Post date:** [March 31, 2010, 12:39pm UTC](https://www.ruby-forum.com/t/custom-cache-store-a-possible/186083/2 "2010-03-31T12:39:01Z")

</div>

On Mar 31, 9:35 am, Alex G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi.
> 
> I want to define my own cache store but I have no idea how to use in  
> my app.
> 
> Rails initializer reads environment config before loading app  
> initializers and plugins. So, i cant write:
> 
> config.cache\_store = :my\_beautiful\_cache\_store, ‘localhost:641’

I don’t think that’s true - I’ve used libmemcached\_store which is a  
plugin.

Fred
