mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-07 03:10:16 +00:00
Ensure memcache TTL cannot be over 30 days (#14592)
Memcached TTL cannot be > 30 days and if it is attempted the TTL is interpreted as a unix timestamp. This PR ensures that the TTL is switched to a unix timestamp in those cases. Fix #14571 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
1 parent
3a4801d195
commit
30f7ddb833
7 files changed
+29
-10
No files matched your search
@@ -25,5 +25,5 @@ func (c *LastCommitCache) getCacheKey(repoPath, ref, entryPath string) string {
|
||||
// Put put the last commit id with commit and entry path
|
||||
func (c *LastCommitCache) Put(ref, entryPath, commitID string) error {
|
||||
log("LastCommitCache save: [%s:%s:%s]", ref, entryPath, commitID)
|
||||
return c.cache.Put(c.getCacheKey(c.repoPath, ref, entryPath), commitID, c.ttl)
|
||||
return c.cache.Put(c.getCacheKey(c.repoPath, ref, entryPath), commitID, c.ttl())
|
||||
}
|
||||
Reference in new issue
Block a user