mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-02-06 00:16:02 +01:00
Revert case-insensitive cache manager update in #3780
This commit is contained in:
parent
64992b3308
commit
6745efc4d6
@ -42,8 +42,7 @@ class ApiCacheManager {
|
|||||||
Logger.debug(`[ApiCacheManager] Skipping cache for random sort`)
|
Logger.debug(`[ApiCacheManager] Skipping cache for random sort`)
|
||||||
return next()
|
return next()
|
||||||
}
|
}
|
||||||
// Force URL to be lower case for matching against routes
|
|
||||||
req.url = req.url.toLowerCase()
|
|
||||||
const key = { user: req.user.username, url: req.url }
|
const key = { user: req.user.username, url: req.url }
|
||||||
const stringifiedKey = JSON.stringify(key)
|
const stringifiedKey = JSON.stringify(key)
|
||||||
Logger.debug(`[ApiCacheManager] count: ${this.cache.size} size: ${this.cache.calculatedSize}`)
|
Logger.debug(`[ApiCacheManager] count: ${this.cache.size} size: ${this.cache.calculatedSize}`)
|
||||||
|
@ -65,7 +65,7 @@ class ApiRouter {
|
|||||||
//
|
//
|
||||||
// Library Routes
|
// Library Routes
|
||||||
//
|
//
|
||||||
this.router.get(/^\/libraries/i, this.apiCacheManager.middleware)
|
this.router.get(/^\/libraries/, this.apiCacheManager.middleware)
|
||||||
this.router.post('/libraries', LibraryController.create.bind(this))
|
this.router.post('/libraries', LibraryController.create.bind(this))
|
||||||
this.router.get('/libraries', LibraryController.findAll.bind(this))
|
this.router.get('/libraries', LibraryController.findAll.bind(this))
|
||||||
this.router.get('/libraries/:id', LibraryController.middleware.bind(this), LibraryController.findOne.bind(this))
|
this.router.get('/libraries/:id', LibraryController.middleware.bind(this), LibraryController.findOne.bind(this))
|
||||||
|
Loading…
Reference in New Issue
Block a user