我正在寻找用于检查特定资源的 Indy IdHTTP 组件的缓存实现,在执行实际 GET 并返回缓存的资源之前(如果合适)?
如果组件是 TIdHTTP 的派生类并自动处理缓存功能,这对我来说是最简单的方法,所以我可以用新组件替换现有的 IdHTTP 对象。
有人见过D2010这样的组件吗?
I dont think there is a component to do that, but you can implement your own based on response header Cache-Control and Expires-Date (i am not sure if it is the corrent name). You should save the page on a file with the Expires date on it, so you can check if you already have the page on cache before make the request to the server. I guess it is what some proxies do, like Squid (of course not as simple as that).
Check this out: Caching in HTTP