Improve caching
This commit is contained in:
parent
2ee3fc0c67
commit
7237fbcc68
5 changed files with 106 additions and 37 deletions
|
@ -109,8 +109,8 @@ def create_indexes():
|
|||
("activity.object.id", pymongo.ASCENDING),
|
||||
("meta.deleted", pymongo.ASCENDING),
|
||||
])
|
||||
DB.cache.create_index([("path", pymongo.ASCENDING), ("type", pymongo.ASCENDING)])
|
||||
DB.cache.create_index("date", expireAfterSeconds=60)
|
||||
DB.cache2.create_index([("path", pymongo.ASCENDING), ("type", pymongo.ASCENDING), ("arg", pymongo.ASCENDING)])
|
||||
DB.cache2.create_index("date", expireAfterSeconds=3600*12)
|
||||
|
||||
# Index for the block query
|
||||
DB.activities.create_index(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue