开发者

prevent page caching with Rails and Passenger in Development Environment

I am running Rails 3 and Passenger 2 and I don't know why but my page is still cached despite having this configuration (in one of my virtual hosts):

<VirtualHost *:80>
    ServerName railstut.dev
    ServerAlias *.railstut.dev
    DocumentRoot "/home/ygamretuta/dev/railstut/public/"
    RailsEnv "development"

    <Directory "/home开发者_StackOverflow/ygamretuta/dev/railstut/">
        AllowOverride all
        Options -MultiViews
    </Directory>
</VirtualHost>

I tried it in Firefox with the browser cache disabled (via web developer plugin) so I don't think there's a problem with the browser cache. I always need to restart the server to see the changes made (even with some minor changes like replacing a text).

What could be the problem?

EDIT Passenger seems to be setting the environment to production despite there being a RailsEnv config option.

EDIT Passenger runs on production environment as seen on some of my pages accessing the DB. It looks for the database name configured in the production section in the database.yml file.


http://groups.google.com/group/phusion-passenger/browse_thread/thread/ddb9dbbad0bfe679


If you have existing file cache page cache entries, they will supercede the dynamic request even after restarting. You should clear your tmp or cache directories if you have ever used the file store for caching.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜