views:

19

answers:

1

I am using the :file_store as rails' default cache, to hold the view count of articles, but I'm not sure the what's the performance of a file cache. Will there be any problem when handling some requests at the same time, and each request uses this cache?

+1  A: 

It all depends on the load of your site, but a file-based cache should be able to handle small to medium sized sites without a problem. Also, remember that the operating system's disk cache will probably keep your cache files in memory if they're used frequently, so the files won't actually be read from disk for every access.

My guess is that the file cache will be enough as long as you're able to serve the site using a single front-end web server. You'll want to switch to a caching server such as memcached when your site gets so big that you need multiple front-end servers to handle the load, but before that happens I wouldn't bother with the added complexity of such a solution.

Pär Wieslander
@Pär Wieslander, hi, thanks again, you are so nice:)
Freewind