Start playing with caching

This commit is contained in:
Thomas Sileo
2018-09-03 09:38:29 +02:00
parent 8e43f4a230
commit 2ee3fc0c67
2 changed files with 16 additions and 1 deletions

View File

@@ -109,6 +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)
# Index for the block query
DB.activities.create_index(