Facing strange caching issues with dynamic Laravel sitemap generation after recent deployment

Author
Sneha Jain Author
|
6 hours ago Asked
|
2 Views
|
0 Replies
0

hey folks,

i just updated our Laravel sitemap generation logic using that new dynamic XML sitemap tool, and we deployed it last week. everything seemed fine initially, but lately, i'm noticing some weird caching issues where the sitemap isn't always reflecting the latest content immediately, even after clearing the app cache. it feels like the XML is sometimes served from an older version for a while, then suddenly updates. we're really expecting it to be real-time for our Laravel SEO efforts, so this is a bit stumpin'.

i've tried a few things already:

  • cleared Laravel cache (php artisan cache:clear)
  • cleared route and view cache
  • checked server-side caching (nginx/apache) but thereโ€™s nothing obvious there that would cause this.

hereโ€™s an example of the odd behavior i'm seeing in our logs:

[2023-10-27 10:05:12] production.INFO: Sitemap accessed, last modified: 2023-10-26 18:30:00
[2023-10-27 10:10:30] production.INFO: New content added, sitemap regenerated.
[2023-10-27 10:11:05] production.INFO: Sitemap accessed, last modified: 2023-10-26 18:30:00  // <-- still old date!
[2023-10-27 10:15:00] production.INFO: Sitemap accessed, last modified: 2023-10-27 10:10:30 // <-- finally updated

what could be causing this persistent caching for our dynamic Laravel sitemap generation, and how can i ensure it's always fresh? any ideas on what else to check would be awesome.

looking forward to any insights!

0 Answers

No answers yet.

Be the first to provide a helpful answer!

Your Answer

You must Log In to post an answer and earn reputation.