Skip to content

Remove guard.history after setting in cache #69

Open
@CalebCourier

Description

@CalebCourier

Currently, if guards are loaded from a config, their history is held in memory. We already have an endpoint for fetching history for a specific guard call that we use when communicating between the client and the server. This cache applies a 5 minute TTL on each history entry as well as limits the cache to only 50 entries to prevent memory leaks.

However, since the guards are now objects kept in memory in the config rather than constructed JIT from the database, history is still being held on the guard instances. We should delete/reset Guard.history to an empty Stack once a /validate call is done. We should also investigate other means of dumping/persisting history somewhere else via a logging API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions