0

So here is the class I need to cache the entire header map. So I figured I should extract it some how.

How can i do this, do i need to iterate them like this, or can I get them all at once?

I intend to store the header map in a cache like :

       LRUPersistentCache<string, pair<HeaderMap, string > > *clientCache;
4

1 回答 1

1

您可以从 HTTPResponse 创建 NameValueCollection(它是一个类似地图的 HTTPResponse 的父级):

HTTPResponse response;
// ...
NameValueCollection nvc(response);
LRUPersistentCache<string, NameValueCollection> clientCache(100);
clientCache.add("myresponse", nvc);
// ...
于 2013-04-26T05:52:37.883 回答