diff --git a/.env.example b/.env.example index 5784fb517e1..802584fefc7 100644 --- a/.env.example +++ b/.env.example @@ -4,6 +4,7 @@ # Cache Configs CACHE_STORE=database # Defaults to database. Other available cache store: redis and filesystem +CACHE_DIR=./data/cache # Directory to store the cache files if using filesystem cache REDIS_URL= # Redis URL - could be a local redis instance or cloud hosted redis. Also support rediss:// URLs PGLITE_DATA_DIR= #../pgLite/ if selecting a directory --- or memory:// if selecting in memory diff --git a/agent/src/index.ts b/agent/src/index.ts index 1ded5914eb0..8da1c3c375a 100644 --- a/agent/src/index.ts +++ b/agent/src/index.ts @@ -1411,7 +1411,7 @@ async function startAgent( const cache = initializeCache( process.env.CACHE_STORE ?? CacheStore.DATABASE, character, - "", + process.env.CACHE_DIR ?? "", db ); // "" should be replaced with dir for file system caching. THOUGHTS: might probably make this into an env const runtime: AgentRuntime = await createAgent(