- Posts: 151
- Thank you received: 8
CDN Caching and Live Auction Updates
3 months 2 weeks ago #372564
by lucad
CDN Caching and Live Auction Updates was created by lucad
-- HikaShop version -- : 6.5.1
-- HikaAuction version -- : 6.0.2
-- Joomla version -- : 6.1.2
-- PHP version -- : 8.4
Hello Team
I'm using HikaAuction together with a CDN.
While the CDN is working well for caching images, CSS, JavaScript, and other static assets, I believe it is also caching part of the auction data.
The issue I'm seeing is that when a user places a bid, other users who are viewing the same auction are not notified of the new bid or the updated auction status. The page appears to continue serving cached data until the cache expires or the page is manually refreshed.
My goal is to continue using the CDN for all static content to improve performance, but exclude the HikaAuction dynamic data (such as bids, current price, auction status, etc.) from being cached so that all users see updates immediately.
Any advice on how to do this please?
Thank you.
-- HikaAuction version -- : 6.0.2
-- Joomla version -- : 6.1.2
-- PHP version -- : 8.4
Hello Team
I'm using HikaAuction together with a CDN.
While the CDN is working well for caching images, CSS, JavaScript, and other static assets, I believe it is also caching part of the auction data.
The issue I'm seeing is that when a user places a bid, other users who are viewing the same auction are not notified of the new bid or the updated auction status. The page appears to continue serving cached data until the cache expires or the page is manually refreshed.
My goal is to continue using the CDN for all static content to improve performance, but exclude the HikaAuction dynamic data (such as bids, current price, auction status, etc.) from being cached so that all users see updates immediately.
Any advice on how to do this please?
Thank you.
Please Log in or Create an account to join the conversation.
3 months 2 weeks ago #372565
by nicolas
Replied by nicolas on topic CDN Caching and Live Auction Updates
Hi,
Well, what CDN are you using and how did you configure it ? That would be necessary in order to understand the situation before I can recommend anything precise.
Well, what CDN are you using and how did you configure it ? That would be necessary in order to understand the situation before I can recommend anything precise.
The following user(s) said Thank You: lucad
Please Log in or Create an account to join the conversation.
3 months 2 weeks ago #372573
by lucad
Replied by lucad on topic CDN Caching and Live Auction Updates
Hi Nicolas, thank you for your answer
Regarding my setup, I use Bunny CDN in conjunction with Amazon S3 and a custom CDN plugin.
Beyond these details, it is difficult for me to provide further technical explanation.
I am providing confidentially the login credentials for my website below.
I would greatly appreciate it if you could take a look please.
Thank you
Regarding my setup, I use Bunny CDN in conjunction with Amazon S3 and a custom CDN plugin.
Beyond these details, it is difficult for me to provide further technical explanation.
I am providing confidentially the login credentials for my website below.
I would greatly appreciate it if you could take a look please.
Thank you
This message contains confidential information
Please Log in or Create an account to join the conversation.
3 months 2 weeks ago #372574
by nicolas
Replied by nicolas on topic CDN Caching and Live Auction Updates
Hi,
Thanks for the details.
The bid amount, current price and auction status are generated by HikaAuction on the server side, directly inside the HTML of the page, at the moment the page is built. So if your CDN stores that HTML page, every visitor is served the cached copy with the bid data frozen as it was when it got cached, until the cache expires. That is exactly the behaviour you describe.
The fix is to keep caching the static files (images, CSS, JS) but stop the CDN from caching the HTML of the auction pages:
- In your Bunny CDN pull zone, the HTML/"document" responses of the auction pages must not be cached. You can either set Bunny to honour the origin Cache-Control headers, or add an edge rule that bypasses the cache for the auction URLs (the com_hikashop pages that display the auctions).
- The "HikaShop CDN" plugin you use (com_joomlamax_hikashopcdn) is a third-party extension, not one of ours. It is normally meant to offload static assets only. If it also offers a page/HTML caching option, exclude the auction pages there as well.
Static assets are identical for every visitor, so they can stay fully cached; only the HTML of the auction pages needs to bypass the cache.
Thanks for the details.
The bid amount, current price and auction status are generated by HikaAuction on the server side, directly inside the HTML of the page, at the moment the page is built. So if your CDN stores that HTML page, every visitor is served the cached copy with the bid data frozen as it was when it got cached, until the cache expires. That is exactly the behaviour you describe.
The fix is to keep caching the static files (images, CSS, JS) but stop the CDN from caching the HTML of the auction pages:
- In your Bunny CDN pull zone, the HTML/"document" responses of the auction pages must not be cached. You can either set Bunny to honour the origin Cache-Control headers, or add an edge rule that bypasses the cache for the auction URLs (the com_hikashop pages that display the auctions).
- The "HikaShop CDN" plugin you use (com_joomlamax_hikashopcdn) is a third-party extension, not one of ours. It is normally meant to offload static assets only. If it also offers a page/HTML caching option, exclude the auction pages there as well.
Static assets are identical for every visitor, so they can stay fully cached; only the HTML of the auction pages needs to bypass the cache.
The following user(s) said Thank You: lucad
Please Log in or Create an account to join the conversation.
3 months 2 weeks ago #372578
by lucad
Replied by lucad on topic CDN Caching and Live Auction Updates
Ok understood, will try to sort it out
Thank you Nicolas!
Thank you Nicolas!
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
3 months 1 week ago #372628
by lucad
Replied by lucad on topic CDN Caching and Live Auction Updates
Hello again
I have confirmed with my developer that we just push/load images assets on our CDN
Infact, after disabling both the cache and the CDN for testing, the issue is the same.
Found out that only the price updates correctly, while the number of bids and the message below it does not get updated.
Please refer to this screenshot and video for details.
Thank you
I have confirmed with my developer that we just push/load images assets on our CDN
Infact, after disabling both the cache and the CDN for testing, the issue is the same.
Found out that only the price updates correctly, while the number of bids and the message below it does not get updated.
Please refer to this screenshot and video for details.
Thank you
Please Log in or Create an account to join the conversation.
3 months 1 week ago #372635
by nicolas
Replied by nicolas on topic CDN Caching and Live Auction Updates
Hello
Thanks for testing with the CDN and cache turned off. That rules out the caching and points to how the live update works on the auction page. I had a look at your jaguar10 auction to be sure.
HikaAuction refreshes the auction while people watch it with a small script that polls the server every few seconds and writes the new values back into specific elements of the page, each one found by its CSS class. On your page the price updates because your price element kept HikaAuction's original id:
The number of bids does not update because, in your customized template, the value sits in your own class and no longer carries the class the script looks for. You currently have:
The script updates the number of bids by looking for the class bid_number_value, so add it next to your own class (keep both):
The same applies to the other live values. Add the matching class to the element that shows each one in your override:
Once those classes are present the live update will fill them in on every poll, the same way it already does for the price.
Thanks for testing with the CDN and cache turned off. That rules out the caching and points to how the live update works on the auction page. I had a look at your jaguar10 auction to be sure.
HikaAuction refreshes the auction while people watch it with a small script that polls the server every few seconds and writes the new values back into specific elements of the page, each one found by its CSS class. On your page the price updates because your price element kept HikaAuction's original id:
Code:
<span id="winning_price" name="winning_price">€ 2.750</span>
The number of bids does not update because, in your customized template, the value sits in your own class and no longer carries the class the script looks for. You currently have:
Code:
<span class="scb-bid-count-value">14</span>
The script updates the number of bids by looking for the class bid_number_value, so add it next to your own class (keep both):
Code:
<span class="scb-bid-count-value bid_number_value">14</span>
The same applies to the other live values. Add the matching class to the element that shows each one in your override:
Code:
bidder_number_value number of bidders
bidder_winning_state winning / losing message
Once those classes are present the live update will fill them in on every poll, the same way it already does for the price.
The following user(s) said Thank You: lucad
Please Log in or Create an account to join the conversation.
3 months 1 week ago #372662
by lucad
Replied by lucad on topic CDN Caching and Live Auction Updates
That worked perfectly Nicolas, thank you.
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
Moderators: Mohamed Thelji
Time to create page: 0.243 seconds