fix cache for Non-Rails app
Merge pull request #569 from t-k/fix_cache

fix cache for Non-Rails app