mirror of
https://github.com/outline/outline.git
synced 2026-03-13 16:19:12 -05:00
Merge branch 'main' of github.com:outline/outline
This commit is contained in:
@@ -22,7 +22,7 @@ if (enabled) {
|
||||
},
|
||||
{
|
||||
type: Hook.UnfurlProvider,
|
||||
value: { unfurl: GitHub.unfurl, cacheExpiry: Minute },
|
||||
value: { unfurl: GitHub.unfurl, cacheExpiry: Minute / 1000 },
|
||||
},
|
||||
{
|
||||
type: Hook.Uninstall,
|
||||
|
||||
@@ -19,7 +19,7 @@ if (enabled) {
|
||||
PluginManager.add([
|
||||
{
|
||||
type: Hook.UnfurlProvider,
|
||||
value: { unfurl: Iframely.unfurl, cacheExpiry: Day },
|
||||
value: { unfurl: Iframely.unfurl, cacheExpiry: Day / 1000 },
|
||||
|
||||
// Make sure this is last in the stack to be evaluated after all other unfurl providers
|
||||
priority: PluginPriority.VeryLow,
|
||||
|
||||
@@ -6,8 +6,8 @@ import Redis from "@server/storage/redis";
|
||||
* A Helper class for server-side cache management
|
||||
*/
|
||||
export class CacheHelper {
|
||||
// Default expiry time for cache data in ms
|
||||
private static defaultDataExpiry = Day;
|
||||
// Default expiry time for cache data in seconds
|
||||
private static defaultDataExpiry = Day / 1000;
|
||||
|
||||
/**
|
||||
* Given a key, gets the data from cache store
|
||||
@@ -32,7 +32,7 @@ export class CacheHelper {
|
||||
*
|
||||
* @param key Cache key
|
||||
* @param data Data to be saved against the key
|
||||
* @param expiry Cache data expiry
|
||||
* @param expiry Cache data expiry in seconds
|
||||
*/
|
||||
public static async setData<T>(key: string, data: T, expiry?: number) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user