Not caching all in memory now.

This commit is contained in:
Jim Miller 2021-01-21 17:48:19 -06:00
parent c555942bf4
commit 1041fc44ec

View file

@ -108,18 +108,19 @@ class CacheEntry():
# It is probably an HTTP header
self.key = cacheData.CacheData(addr, self.keyLength, True)
try:
# Some keys seem to be '_dk_http://example.com https://example.com https://www.example.com/full/url/path'
# fix those up so the actual URL will work as a hash key
# in our table if key has whitespace followed by final
# http[s]://something, substitute, otherwise this leaves
# it unchanged
self.key = re.sub(r'^.*\s(https?://\S+)$', r'\1', self.key)
except TypeError:
## Some 'keys' are not bytes or text types. No idea why
## not.
# print(self.key)
pass
# print("cacheEntry key:%s"%self.key)
# try:
# # Some keys seem to be '_dk_http://example.com https://example.com https://www.example.com/full/url/path'
# # fix those up so the actual URL will work as a hash key
# # in our table if key has whitespace followed by final
# # http[s]://something, substitute, otherwise this leaves
# # it unchanged
# self.key = re.sub(r'^.*\s(https?://\S+)$', r'\1', self.key)
# except TypeError:
# ## Some 'keys' are not bytes or text types. No idea why
# ## not.
# # print(self.key)
# pass
block.close()
def keyToStr(self):