Private (Logged in) Cache - Precache with Crawler

#1
Hello,

I have a quick question.

I use the CLI and I run the crawler to pre-cache my pages. With Wordpress there is a way to run the crawler as a user so it will cache the user role to create the private cache (so a logged in user can get a 'hit' on first page visit). Is there a way to do this with the Magento crawler?

As it is right now, all I can find is a way to pre-cache the public pages. I use this page for reference: Crawler Script | Magento 2 | LiteSpeed Documentation (litespeedtech.com)

Thank you in advance!
 
#3
That is unfortunate. Do you happen to know of any extensions that would work like that and work with LiteSpeed? Like instead of using LiteMage.

It's not good when a competitor's site loads instantly even when logged in. I have a lot of products so when it's not cached pages take like 8-10 seconds. It's probably my theme slowing it down too. But I just want to pre-cache even for logged in users so they don't have to wait - because they'll probably just leave.

Thanks!
 
#5
I'm trying to warm up (pre-cache) the private cache. I want the first page load to be a 'hit' for logged in customers. So I was just wondering if there was something that would let me do that if replace LiteMage.
 

serpent_driver

Well-Known Member
#6
As far as I know LiteMage doesn't offer private cache for logged in users. Even it would be possible to provide private cache there is no technical way to warmup the cache for each customer, because private cache means that every customer has an own (private) cache copy. Also warmup the private cache doesn't make sense because the TTL of private cache is very short.

If you want a complete cache solution based on LiteSpeed LScache that offers private cache and much more check this:

https://www.cachecrawler.com/LiteCache:::39.html
https://www.cachecrawler.com/Download/LiteCache-for-Magento-2::118.html
 
#7
"As far as I know LiteMage doesn't offer private cache for logged in users."
It does, it's just after the first visit.

"Even it would be possible to provide private cache there is no technical way to warmup the cache for each customer, because private cache means that every customer has an own (private) cache copy."
I would agree, but it actually is technically possible because it can be done with LiteSpeed and WordPress. So it's just Magento and LiteMage, as you pointed out earlier.

I'll have to check out that cachecrawler. Thanks for the information and the responses, it's much appreciated.
 

serpent_driver

Well-Known Member
#8
I would agree, but it actually is technically possible because it can be done with LiteSpeed and WordPress. So it's just Magento and LiteMage, as you pointed out earlier.
No, it isn't possible, because cache plugin for WordPress doesn't provide private cache for roles. This is public cache with different cache vary for roles.
 
#9
No, it isn't possible, because cache plugin for WordPress doesn't provide private cache for roles. This is public cache with different cache vary for roles.
Ya, it's cached for Wordpress. If you run the crawler for a user it will pre-cache for all users in that role. Those users now visit the site and it's a 'hit'. That to me is 'cached'. So ya, it does cache for private/logged in users. How it works don't matter. Point is, it pre-caches private cache so a logged in user does not have to wait for page load.

Wordpress is off-topic I was only using for reference. Seeing how it can't be done with LiteMage this topic done.
 

serpent_driver

Well-Known Member
#10
You must see hit, private. If it is only hit then it is not private cache. And again LiteMage doesn't support private cache for logged in users. Only LiteCache can private cache for logged in users.
 
Top