fix: Redis expire guard, transferOwnership prev-owner, SVG regex
- Redis get() rejects legacy expire=0 entries and cleans them up - transferOwnership invalidates previous owner in addition to new - SVG regex uses non-greedy match and handles self-closing <svg /> - SVG fallback returns empty string instead of HTML wrapper - Memory channel comment: FIFO eviction, not timestamp-based
This commit is contained in:
4 files changed
+17
-3
No files matched your search
@@ -56,6 +56,11 @@ export class RedisCacheHandler implements CacheHandler {
|
||||
body: number[];
|
||||
};
|
||||
|
||||
if (parsed.expire <= 0) {
|
||||
await this.redis.del(this.entryKey(cacheKey)).catch(() => {});
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const allTags = [...parsed.tags, ...softTags];
|
||||
const expiration = await this.getExpiration(allTags);
|
||||
if (expiration !== 0 && expiration > parsed.timestamp) {
|
||||
|
||||
Reference in new issue
Block a user