forked from indymedia/epicyon
Store actor in cache
parent
cbb8df7431
commit
443b73223e
|
@ -111,6 +111,7 @@ from announce import createAnnounce
|
||||||
from announce import outboxAnnounce
|
from announce import outboxAnnounce
|
||||||
from content import addHtmlTags
|
from content import addHtmlTags
|
||||||
from media import removeMetaData
|
from media import removeMetaData
|
||||||
|
from cache import storePersonInCache
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -2260,7 +2261,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
with open(actorFilename, 'w') as fp:
|
with open(actorFilename, 'w') as fp:
|
||||||
commentjson.dump(actorJson, fp, indent=4, sort_keys=False)
|
commentjson.dump(actorJson, fp, indent=4, sort_keys=False)
|
||||||
# also copy to the actors cache and personCache in memory
|
# also copy to the actors cache and personCache in memory
|
||||||
self.server.personCache[actorJson['id']]=actorJson
|
storePersonInCache(self.server.baseDir,actorJson['id'],actorJson,self.server.personCache)
|
||||||
actorCacheFilename=self.server.baseDir+'/cache/actors/'+actorJson['id'].replace('/','#')+'.json'
|
actorCacheFilename=self.server.baseDir+'/cache/actors/'+actorJson['id'].replace('/','#')+'.json'
|
||||||
with open(actorCacheFilename, 'w') as fp:
|
with open(actorCacheFilename, 'w') as fp:
|
||||||
commentjson.dump(actorJson, fp, indent=4, sort_keys=False)
|
commentjson.dump(actorJson, fp, indent=4, sort_keys=False)
|
||||||
|
|
Loading…
Reference in New Issue