I am currently building an app that benefits from Twitter Cards to increase interactions, but I am facing a problem: Twitter caches my content for 7 days, and I don’t have any mean to control it.
I totally understand why Twitter needs to keep a cache, and that you can’t just refresh everything every time, but cache invalidation should be easier than Use the cards validator.
I’ve come up with multiple solutions, some of them being better than others (as always):
twitter:refresh_interval meta tag kindly asking Twitter to refresh the cache every N seconds, when possible
- This would allow granular configuration
- This would only apply to HTML pages, not to images: HTML pages are supposed to be lighter (and it is possible to change the twitter:image tag to change the image).
Respect the Cache-Control-Policy (+ ETAG)
This would be fine, maybe harder for you to manage. Would work on images and on html pages
This has a major advantage: a website may tell you its content hasn’t changed since your last visit, and that would be awesome for you.
Don’t cache the HTML page at all?
This would even be easier for everyone: by lowering the pages’ cache to ~1H (maybe?), one could edit the tags without hurting you.
In a way, it would not be harder than the other solutions … but would be much less flexible
Provide an API to refresh an URL’s cache
That could be cool, but (could?)would introduce the concept of website ownership… and the rate limiting would be a non sense (per URL? per User? per Website?)
I do really hope you’ll implement something to let us interact even more with our users, while keeping the informations accurate.