Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing is rendering when the cache is enabled on edit mode off #5

Open
maoaiz opened this issue Oct 21, 2014 · 1 comment
Open

Nothing is rendering when the cache is enabled on edit mode off #5

maoaiz opened this issue Oct 21, 2014 · 1 comment

Comments

@maoaiz
Copy link
Contributor

maoaiz commented Oct 21, 2014

By default cache is enabled in CMSPluginBase, this cause that the css background property doesn't run when the edition mode is off.
If I put cache in False to render the content of the model property, the plugin doesn't works after reload de page with Ctrl + F5 several times.
What do I need to do to enable the cache in the plugin? I want cache!

@WnP
Copy link
Owner

WnP commented Nov 9, 2014

Firstly don't be confused with your web browser's cache and django's cache, hitting Ctrl-F5, or whatever shortcut is provided by your web browser, will only refresh your web browser's cache not django's one -which is on the server-

quick fix solutions are:

  • waiting for the cache to be updated, which is the purpose of a cache, you can change the django cms cache duration by editing CMS_CACHE_DURATIONS which default is to 60''
  • setting the djangocms-css-background.cache attribute to false which will disable the cache for the plugin -maybe I should add a entry in the configuration file to make this more simple-

In the future I'll implement a feature which will reset the djangocms-css-background plugin cache on update/creation, which is more looks like the feature you want, this looks like possible

but right now I have no time to do it, feel free to send a pull request if you have some ;-)

@WnP WnP added the enhancement label Nov 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants