-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Support for skip Nginx caching on custom defined URL slugs #175
Comments
a really simple solution would be something like add /ex-* so we can just add the path like "ex-" as prefix and viola, no cache. then would be /ex-path1 or /ex-path2 etc. |
Thanks for the suggestion @bari86 As per our discussion on Discord, I'm not opposed to adding this feature. However, over the past few years, every time someone has requested this feature and I've asked for a case example, it's always some poorly coded plugin that is not properly using the WooCommerce checkout, or something like that. The case you shared in Discord was re: Cartflows, a type of funnel-building plugin that hacks WooCommerce cookies... my opinion is that such plugins are rather gimmicky and unstable, and not worthy of supporting. TLDR even if we added custom URL skip cache rules, I'm guessing there are going to be other conflicts with that plugin... In other words I think the concept of custom URLs for skip cache is fine, but in practice I haven't seen a need for it. Rather than offering tons of jiggery hackery customization features, we've been really careful about things like this. For example, if someone wants to skip cache on foreign language WooCommerce slugs, the "official" view of SlickStack is that we should add new rules for that language, and then hardcode it. In other words, using community feedback to determine changes to our hardcoded source vs. having dynamic features everywhere. After several years and hundreds of clients using SlickStack (many with millions of sales per year) I've still never had a successful client require such customization. |
Still, at least for the purpose of debugging or emergency fixes, it's probably a good feature to add. So I think we can proceed with adding a custom skip cache feature on a sort of preliminary basis and see how it goes. This will also need to keep in mind the foreign language slugs that are currently hardcoded in Ref: https://github.com/littlebizzy/slickstack/blob/master/modules/nginx/sites/production.txt It might be a good idea to address both of these issues at the same time. For example, moving the language slugs into their own Nginx submodule files like |
This has been sitting for 2 years: #43 |
Also see @backamblock comment on that thread:
|
I mention this because we have discussed in the past defining custom URLs in But for now I guess the easiest solution is just dropping a file in We also need test to make sure all these (new) Nginx files are working together, since defining rules in submodules loads differently than with server blocks... |
Hi, adding custom url in ss-config would be good too but it might takes time to do it. keep up the good work. |
Related: |
some e-commerce site require certain custom path to be excluded from cache. since SS always cache almost everything and hardcoded code, there is no function to add custom path to exclude from cache. please add this as soon as possible as its vital feature to exclude cache on certain url
i believe in the modules>nginx>sites>production.txt there are this code
## ENGLISH - sensitive wordpress urls should always skip the cache if ($request_uri ~* "index.php|/account.*|/cart.*|/checkout.*|/contact.*|/dashboard.*|/login.*|/my-.*|/order.*|/profile.*|/register.*|/settings.*|/view.*|/wc-api.*|/wp-admin.*|wp-.*.php") { set $skip_cache 1; }
in which allow custom url that can be skipped from cache. can you in a way make it easier for us to define any custom path to skip cache?
The text was updated successfully, but these errors were encountered: