Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added cachedir to filesystem cache #3291

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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