Merge branch 'main' of github.com:outline/outline

This commit is contained in:
Tom Moor
2024-08-24 08:36:44 -04:00
3 changed files with 5 additions and 5 deletions

View File

@@ -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,

View File

@@ -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,

View File

@@ -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 {