# Weird caching error

**URL:** <https://www.ruby-forum.com/t/weird-caching-error/195151>\
**Category:** Rails\
**Created:** [September 17, 2010, 7:08pm UTC](https://www.ruby-forum.com/t/weird-caching-error/195151 "2010-09-17T19:08:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![badnaam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e36b37/32.png) [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Post date:** [September 17, 2010, 7:08pm UTC](https://www.ruby-forum.com/t/weird-caching-error/195151/1 "2010-09-17T19:08:30Z")

</div>

Using memcached/dalli on rails 2.3.5

I am trying to render to partials from the cache…and I see the  
following messages in the production log.

[DEBUG 17-09-2010 10:03:06] Cache read: category\_nav  
[DEBUG 17-09-2010 10:03:06] 127.0.0.1:11211 running memcached v1.4.2  
[DEBUG 17-09-2010 10:03:06] Cache hit: category\_nav ({})  
[DEBUG 17-09-2010 10:03:06] Rendered shared/\_cat\_nav\_list (4.0ms)  
[DEBUG 17-09-2010 10:03:06] Cache read: city\_nav  
[DEBUG 17-09-2010 10:03:06] Cache hit: city\_nav ({})

I can read both category\_nav and city\_nav partials from the production  
irb console and see the desired html output.

How ever they don’t render in the page!

This is what I do in the partials

\<% Rails.cache.fetch ‘category\_nav’ do %\>

\<%end%\>

Why is this happening? Also, whats the empty hash in [DEBUG 17-09-2010  
10:03:06] Cache hit: category\_nav ({}) \<= this one.

Thanks
