Codes and details are moved to https://easyengine.io/tutorials/wordpress/woocommerce-window-shopping-caching-technique/
-
-
Save rahul286/dc64ae84c97868b862c4 to your computer and use it in GitHub Desktop.
this is a little OT, but i recently built my first jekyll site. I used it as an exercise to catch up on a lot of stuff that i have been reading about but had no practical experience with. So on top of jekyll i am using octopus 3.0 (still in alpha) and i built a whole node/gulp based build and deployment infrastructure. It took a lot of work and tweaking to get everything set up, but now that it is, i have a lot of flexibility and it is very, very easy to add new posts and edit old ones written in clean, simple markdown, test locally and deploy with a single command. in my research i found a lot of very cool static site generation systems and maybe i'll switch to a different one someday (if i do it will mainly be to move to an all-node workflow), but for now i am finding jekyll to suit my needs pretty well. If you want to host on github, using jekyll seems like a no-brainer.
having your site's source embedded in an easily modifiable git repo definitely seems like a good idea to me.
@rahul286 why do you prefer to check for the "wp_woocommerce_session_" cookie instead of "woocommerce_items_in_cart"? What benefits do you see?
@pablopaul both serves different purpose. woocommerce_items_in_cart
is used to decide weather to skip cache or not.
Once a visitor adds something to cart and you decide to skip cache for them, you basically create a different cached version of site for them in lines using wp_woocommerce_session_
set $rt_session "";
if ($http_cookie ~* "wp_woocommerce_session_[^=]*=([^%]+)%7C") {
set $rt_session wp_woocommerce_session_$1;
}
if ($skip_cache = 0 ) {
more_clear_headers "Set-Cookie*";
set $rt_session "";
}
fastcgi_cache_key "$scheme$request_method$host$request_uri$rt_session";
This avoid session/cart collision.
sorry, but where I have to put woo-nginx.conf ? /etc/nginx/
???
@pjv
/store
. Anything else can be added. I should have added note about it.