()
| 22 | var libraryFileCountCacheInitOnce sync.Once |
| 23 | |
| 24 | func InitLibraryFileCountCacheInvalidator() { |
| 25 | libraryFileCountCacheInitOnce.Do(func() { |
| 26 | model.SetFileCountCacheInvalidator(invalidateLibraryFileCountCache) |
| 27 | }) |
| 28 | } |
| 29 | |
| 30 | func invalidateLibraryFileCountCache(eid int64, libraryID int64) { |
| 31 | if libraryID <= 0 || !common.RedisEnabled { |