mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 14:32:17 +00:00
make cached assets ttl set via config
This commit is contained in:
parent
b65dfb02a4
commit
9ae37d1814
2 changed files with 5 additions and 1 deletions
|
@ -4,10 +4,11 @@ db = require "./db"
|
|||
async = require "async"
|
||||
logger = require "logger-sharelatex"
|
||||
oneDay = 24 * 60 * 60 * 1000
|
||||
Settings = require "settings-sharelatex"
|
||||
|
||||
module.exports = ProjectPersistenceManager =
|
||||
|
||||
EXPIRY_TIMEOUT: oneDay * 2.5
|
||||
EXPIRY_TIMEOUT: Settings.project_cache_length_ms || oneDay * 2.5
|
||||
|
||||
markProjectAsJustAccessed: (project_id, callback = (error) ->) ->
|
||||
db.Project.findOrCreate(where: {project_id: project_id})
|
||||
|
@ -52,3 +53,4 @@ module.exports = ProjectPersistenceManager =
|
|||
.then((projects) ->
|
||||
callback null, projects.map((project) -> project.project_id)
|
||||
).error callback
|
||||
|
||||
|
|
|
@ -35,8 +35,10 @@ module.exports =
|
|||
load_port: 3044
|
||||
host: "localhost"
|
||||
|
||||
|
||||
apis:
|
||||
clsi:
|
||||
url: "http://localhost:3013"
|
||||
|
||||
smokeTest: false
|
||||
project_cache_length_ms: 60 * 60 * 24
|
Loading…
Reference in a new issue