-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
"Actioned events" is empty all the time #45
Comments
It is based on actioned events. From async addActionedEvent(ae: ActionedEvent) {
const events = await this.cache.wrap(`actionedEvents-${this.subreddit.display_name}`, () => []) as ActionedEvent[];
events.unshift(ae);
await this.cache.set(`actionedEvents-${this.subreddit.display_name}`, events.slice(0, this.actionedEventsMax), {ttl: 0});
} This behavior may be a result of the default cache store using lru-cache. The default max store size is 500 keys -- if there are many things being cached it may be that the KV for actioned events is being dropped because it is too infrequently set. Trying to verify this now... |
@FoxxMD you should be storing two caches, one for all events and one for actioned. This way the last 500 actioned events are also cached. Personally I'd like to enable a mode to store all actioned ones forever. I have more than enough memory in my server to handle this. (128GB) |
I'm closing this as it should be solved by switching to database persistence in v0.11.0. If anyone has this issue still I can re-open. |
Seems that actioned events max kept is based on total events not actioned ones meaning after x events the "actions events" page is cleared.
The text was updated successfully, but these errors were encountered: