fix(cache): use user-writable ~/.serve.zone/dcrouter for TsmDB and centralize data path logic
This commit is contained in:
@@ -219,7 +219,7 @@ const router = new DcRouter({
|
||||
storage: { fsPath: '/var/lib/dcrouter/data' },
|
||||
|
||||
// Cache database
|
||||
cacheConfig: { enabled: true, storagePath: '/etc/dcrouter/tsmdb' },
|
||||
cacheConfig: { enabled: true, storagePath: '~/.serve.zone/dcrouter/tsmdb' },
|
||||
|
||||
// TLS & ACME
|
||||
tls: { contactEmail: 'admin@example.com' },
|
||||
@@ -388,7 +388,7 @@ interface IDcRouterOptions {
|
||||
};
|
||||
cacheConfig?: {
|
||||
enabled?: boolean; // default: true
|
||||
storagePath?: string; // default: '/etc/dcrouter/tsmdb'
|
||||
storagePath?: string; // default: '~/.serve.zone/dcrouter/tsmdb'
|
||||
dbName?: string; // default: 'dcrouter'
|
||||
cleanupIntervalHours?: number; // default: 1
|
||||
ttlConfig?: {
|
||||
@@ -734,7 +734,7 @@ An embedded MongoDB-compatible database (via smartdata + LocalTsmDb) for persist
|
||||
```typescript
|
||||
cacheConfig: {
|
||||
enabled: true,
|
||||
storagePath: '/etc/dcrouter/tsmdb',
|
||||
storagePath: '~/.serve.zone/dcrouter/tsmdb',
|
||||
dbName: 'dcrouter',
|
||||
cleanupIntervalHours: 1,
|
||||
ttlConfig: {
|
||||
|
||||
Reference in New Issue
Block a user