mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-09 05:21:13 +02:00
Not caching all in memory now.
This commit is contained in:
parent
c555942bf4
commit
1041fc44ec
1 changed files with 13 additions and 12 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue