jgarber / radiant-chronicle-extension

Provides history, diffs, and dev-only drafts to Radiant CMS
Other
42 stars 17 forks source link

Don't clear cache when you save a draft #46

Closed jgarber closed 14 years ago

jgarber commented 14 years ago

Drafts don't affect the live site, so don't expire the cache when a page/snippet/layout gets saved as draft/reviewed.

jgarber commented 14 years ago

Don't clear the cache when you save an draft or reviewed page. Closed by bcb970f453840ef6e88b4eee8d8b39841f329214.

rca commented 14 years ago

If the cache is not cleared when a draft page is saved, I cannot immediately see the change when accessing the page using http://dev.hostname. Is this the intended behavior? If so, what's the recommended way to see draft changes?

I understand why it's not desirable to clear the cache in a production environment from a performance standpoint, but not being able to see the new version of a draft immediately is tough on usability.

jgarber commented 14 years ago

First, Rails' development, test, and production environments are different from Radiant's dev and live modes.

You're right that it's desirable to not clear the cache when you save a draft because it doesn't affect live mode, which is the only one to use the cache. Since dev mode doesn't use the cache, you should see draft changes immediately on the dev site.

If you're not, please make sure Chronicle is the only extension you have installed and carefully document your settings and steps to reproduce it in a new GitHub issue. Thanks!

jgarber commented 14 years ago

Ah! I understand now. Dev caching was a regression introduced in 0.8. My no_dev_cache extension fixes that, but it was also fixed in Radiant core at 4d2ff81d0e5476a0eec4d8489e6c55b7d07da1a7

So, you'll need that extension to work around the bug in 0.8