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

DIAZO_ALWAYS_CACHE_RULES not working as expected #127

Open
jjmurre opened this issue Apr 12, 2017 · 4 comments
Open

DIAZO_ALWAYS_CACHE_RULES not working as expected #127

jjmurre opened this issue Apr 12, 2017 · 4 comments

Comments

@jjmurre
Copy link

jjmurre commented Apr 12, 2017

Even when DIAZO_ALWAYS_CACHE_RULES has been set to 'false', the rules are cached.

The reason is that the check is done with:

if environ.get('DIAZO_ALWAYS_CACHE_RULES') and while environment values are just strings, this condition is always true.

@gforcada
Copy link
Member

@jjmurre thanks for reporting the error and already nailing where the problem is!

Would you mind providing a pull request with a fix? If you still haven't done so, you would be required to sign the Contributors Agreement.

@jjmurre
Copy link
Author

jjmurre commented Apr 18, 2017

I tried to checkout plone.app.theming and build it with the provided buildout.cfg. Then run tests and add a test for the fix I want to provide.

That does not work (several error e.g. missing zc.recipe.cmmi, version conflicts etc.).

Is this approach (build stand-alone plone.app.theming) supposed to be working?

@ale-rt
Copy link
Member

ale-rt commented Jun 22, 2017

Anyway the behavior is consistent with the documentation that says "unless the environment variable DIAZO_ALWAYS_CACHE_RULES is set", without specifying anything about the value.

I am not afraid of changing the behavior in such a way that it checks for a "truish" value ('true', '1', 'yes', 'y', whatever), but if this happens we also have to update the docs :)

@thet
Copy link
Member

thet commented Jul 8, 2024

I just stumpled into this problem, where DIAZO_ALWAYS_CACHE_RULES is set in buildout and cannot easily be unset in buildout config files unless overwriting the whole instance environment section.
For respecting the value of this variable, I'm 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants