Surrogate key length limit
Surrogate keys have a limit of 1024 in length. See https://docs.fastly.com/guides/purging/how-do-i-set-a-surrogatekey-header-based-on-the-url
Going over this length was causing major issues for us and it was not easy to track down the cause.
Perhaps this gem should raise an exception if the surrogate key header is being set with a value longer than 1024
Yea, it's unfortunate that you ran into this issue.
I'll talk to some folks internally about a good way of dealing with this; my main concern with adding it as an exception is in the event that the length requirements change in our purging ecosystem, and we forget to change it here; that will probably lead to even more confusion for folks.
Thanks for bringing this up.
@set5think do you have news?
A setting like the maxlength would be best but in the config/initializer to deal with change over time wouldn't it?
One option would be to use hashed equivalents when we reach limits, like the Drupal plugin:
http://cgit.drupalcode.org/fastly/tree/src/EventSubscriber/SurrogateKeyGenerator.php?h=8.x-3.x http://cgit.drupalcode.org/fastly/tree/src/CacheTagsInvalidator.php?h=8.x-3.x