Purge batch of surrogate keys

Comments

7 comments

  • Leon Brocard

    Hi sky,

    You can only purge one key per request, so you'd have to make 100 requests.

    However, this suggests that perhaps you could have set a common surrogate key on all these objects? That would allow you to purge them with one request.

    Regards, Léon

    0
    Comment actions Permalink
  • sky

    THANK YOU LÉON!

    Those 100 keys are chosen from a pool of 1000 keys based on custom logic, and are always different.

    IT WOULD BE VERY USEFUL TO HAVE THE FUNCTIONALITY OF PURGING BATCH OF SURROGATE KEYS. It would be both more easy to purge, and more FASTLY since it would go trough all cached objects once with all the batch.

    0
    Comment actions Permalink
  • Leon Brocard

    Thanks for the suggestion. That seems like a reasonable feature and I've passed it on to our development team.

    Regards, Léon

    0
    Comment actions Permalink
  • Peter Wohlers

    I guess it should also be noted that you can have multiple surrogate-keys per object, up to 16kB of keyspace for keys with a 1kB max size for a single key, so batches might not necessarily be needed if you wanted to do things like tag objects with oh...let's say "css" , "/static" , "build1234" , "v-day" and/or "10Jan2016", it might be easy to create logical groupings that minimize the need for multiple purges.

    --Peter

    0
    Comment actions Permalink
  • sky

    THANK YOU LÉON, YOU ARE DOING GOD'S WORK!

    Peter thanks for the suggestion, however we cannot create logical groupings since the resources needed to be purged are dynamic.

    0
    Comment actions Permalink
  • wimleers

    Echoing the need for this. Drupal 8 has built-in support for cache tags, which is effectively identical to Fastly's cache tags. Drupal 8 very often needs to invalidate multiple cache tags (~ surrogate keys) at the same time.

    0
    Comment actions Permalink
  • Chaim Klar

    +1 waiting for this feature

    0
    Comment actions Permalink

Please sign in to leave a comment.