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

Use transient instead of option as cache #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

soderlind
Copy link

Transients are inherently sped up by caching plugins, where normal Options are not.

Also:

  • Add $deps to wp_dynamic_css_enqueue, $deps is an array of registered stylesheet handles this stylesheet depends on.
  • Reformat code according to WordPress Coding Standards

…ped up by caching plugins, where normal Options are not.

Add `$deps` to `wp_dynamic_css_enqueue`, $deps is an array of registered stylesheet handles this stylesheet depends on.
Reformat code according to WordPress Coding Standards
@ykadosh
Copy link
Contributor

ykadosh commented Oct 20, 2017

Hi there, thank you for the contribution, great PR!

The $deps array is a great solution to one of the issues that is currently pending.

Using transients is also a nice idea, however it defeats the purpose of our internal cache. We want to give the developer the option to clear the cache manually when a user changes a settings that affects the stylesheet. Using transient may cause the data to expire too often, even if the stylesheet hasn't changed. This will trigger the compiler every time and will cause a performance impact.

Regarding the code formatting - i'm following a different format, and I would need to change the entire framework's code base to match that, so i'll wait on it for now.

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

Successfully merging this pull request may close these issues.

None yet

2 participants