views:

28

answers:

1

Hi,

I have my views and layouts split into multiple partials, some of them are static partials i.e, no data from the database being displayed here. Does it make sense to cache these to prevent the erb templating system from generating the html each time or it only makes sense to cache in situations where something needs to be retrieved from the db each time.

thanks, ash

A: 

Benchmark.

The actual performance is going to vary based on how your fragment cache is configured. For example, if you're caching to a shared storage like NFS it may be much slower. If your fragment cache is memcached, it may be faster to pull from there.

Duncan Beevers
what if I use the default. BTW what is the default?
Default one is `FileStore` if `tmp/cache` directory is present or `MemoryStore` otherwise. See http://guides.rubyonrails.org/caching_with_rails.html#cache-stores
skalee