Skip to content
Discussion options

You must be logged in to vote

Compaction was kinda implemented behind an experimental flag but it's proved a much harder challenge than we expected and it'll probably be removed.

Generally the solution we recommend is you add a cache buster key to your query array that updates every so often to force a new shape e.g. this returns a string which updates once a week:

function getUTCWeekAndYear() {
  const now = new Date();
  
  // Create UTC date at midnight
  const utc = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()));
  
  // ISO week: week 1 contains the first Thursday of the year
  // Set to nearest Thursday: current date + 4 - current day (Mon=1, Sun=7)
  const dayNum = utc.getUTCDay() ||

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@JarvisH
Comment options

@JarvisH
Comment options

@KyleAMathews
Comment options

Answer selected by JarvisH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants