yatt-ai / yattie

A tool to help testers test.
GNU General Public License v3.0
61 stars 10 forks source link

feat: Add a setting for cached session clean up #71

Closed dacoaster closed 7 months ago

dacoaster commented 1 year ago
dacoaster commented 7 months ago

Currently all sessions get a folder with related evidence/files inside. Over time this could consume a lot of disk space after many sessions.

dacoaster commented 7 months ago

@dockabernathy01 - I'll leave this one for you.

SmartWolf1220 commented 7 months ago

@dacoaster, please tell me more about this issue. Place a "Clear Cache" button to clear the sessions folder. And if a session has been modified for more than 3 days(retention days), the session folder is automatically deleted. Is it right?

SmartWolf1220 commented 7 months ago

clear cache clear cache 1

dacoaster commented 7 months ago

@dockabernathy01 Yes

please make the default retention period 7 days and change the wording to "Are you sure you want to clear the local session cache?"

dacoaster commented 7 months ago

@dacoaster, please tell me more about this issue. Place a "Clear Cache" button to clear the sessions folder. And if a session has been modified for more than 3 days(retention days), the session folder is automatically deleted. Is it right?

Yes.

The retention days should go in the config.json as

cache: {
    retentionPeriod: INT
}

the default should be 7 days

SmartWolf1220 commented 7 months ago

@dacoaster , Currently I store retention days like this. config: { ..... retentionDays: 7, } I think there is no need to make cache object and store retentionDays to cache object.

dacoaster commented 7 months ago

In the future we will likely add more options for managing the cache, so I'd like the key there for now

SmartWolf1220 commented 7 months ago

Ok, I got it.