Skip to content

Commit

Permalink
Added cachedir to filesystem cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Swader committed Feb 5, 2025
1 parent 2eb94ab commit 22fe1ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 22fe1ee

Please sign in to comment.