budgetneon / v2pagecache

Page Cache for OpenCart V2.X
58 stars 26 forks source link

Cached real-time generated price list #30

Open edichome opened 6 years ago

edichome commented 6 years ago

Hello. Please help remove from cache link "/index.php?route=xls/xls_pricelist" - this is real time generated XLS Price list in my website. I made: private $skip_urls= array( '#/index.php?route=xls/xls_pricelist#', ... but of course it is doesn't work for me. Also, how to make that complete order remove quantity from stock? Also need clean cache only.

krschwab commented 6 years ago

Just use #xls_pricelist#

Question marks are special characters in a regex.

On Feb 20, 2018 9:23 AM, "edichome" notifications@github.com wrote:

Hello. Please help remove from cache link "/index.php?route=xls/xls_pricelist" - this is real time generated XLS Price list in my website. I made: private $skip_urls= array( '#/index.php?route=xls/xls_pricelist#', ... but of course it is doesn't work for me. Also, how to make that complete order remove quantity from stock? Also need clean cache only.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/budgetneon/v2pagecache/issues/30, or mute the thread https://github.com/notifications/unsubscribe-auth/AMMYVbb4-xbBlvvdYLZtXiAGJBvL7hytks5tWuOMgaJpZM4SMIXW .

edichome commented 6 years ago

Just use #xls_pricelist#

Thank you, it is work for me.

guidone65 commented 5 years ago

Hi, in my product page i have some dynamic contents from a vQmod to print estimated delivery dates. Any chance to DON'T cache these infos only?

Kind regards!

budgetneon commented 5 years ago

It caches by url, so not really. You could load that part of the page with an ajax call and add it to the list of urls to not cache.

Thanks!

Kerry

On Thu, Dec 6, 2018 at 4:57 AM guidone65 notifications@github.com wrote:

Hi, in my product page i have some dynamic contents from a vQmod to print estimated delivery dates. Any chance to DON'T cache these infos only?

Kind regards!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/budgetneon/v2pagecache/issues/30#issuecomment-444832858, or mute the thread https://github.com/notifications/unsubscribe-auth/AIZy3OcEb3DdfW39EsxpqL2iQMSXFmOpks5u2Pg1gaJpZM4SMIXW .

guidone65 commented 5 years ago

Thank you so much Kerry to find time to reply!

guidone65 commented 5 years ago

What could be very useful is to have a precache function or external script to use with cron to cache all pages site every day. The idea is: 1) set private $expire='86400' (24 h) 2) set a cron job every day at 23:30 to delete all expired cache files older then 24 h: find /your_opencart_root/system/cache/v2pagecache -name \*.cache -type f -mmin +24 -delete 3) set another cron job every day at 23:45 to pre cache all pages, so i will serve always fast cached pages to customers and with fresh dynamic contents if any.

@budgetneon could you be so kind to suggest me how to have this pre-cache function?

Thanks so much!

Guido

budgetneon commented 5 years ago

There's no easy way to do what you're asking for. The cache module has no idea what urls or pages might exist.

You would need some sort of generic crawler that loads the homepage and follows all the links.

Thanks

Kerry

On Sat, Dec 8, 2018 at 4:39 AM guidone65 notifications@github.com wrote:

What could be very useful is to have a precache function or external script to use with cron to cache all pages site every day. The idea is:

  1. set private $expire='86400' (24 h)
  2. set a cron job every day at 23:30 to delete all expired cache files older then 24 h: find /your_opencart_root/system/cache/v2pagecache -name *.cache -type f -mmin +24 -delete
  3. set another cron job every day at 23:45 to pre cache all pages, so i will serve always fast cached pages to customers and with fresh dynamic contents if any.

@budgetneon https://github.com/budgetneon could you be so kind to suggest me how to have this pre-cache function?

Thanks so much!

Guido

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/budgetneon/v2pagecache/issues/30#issuecomment-445449531, or mute the thread https://github.com/notifications/unsubscribe-auth/AIZy3E35cK50aTrrrUNDQIJ5ZgXVD5SCks5u25bTgaJpZM4SMIXW .