Description
In the current system implementation, the list of log spaces is managed through caching to improve performance and reduce direct access to the database. However, we have identified an issue: when new log spaces are added or existing ones are deleted, the cache does not update in a timely manner to reflect these changes. This leads to the following problems:
- The user interface may display an inaccurate list of available log spaces because the cache includes spaces that have been deleted or excludes newly added spaces.
- Business logic that relies on the latest list of log spaces may produce incorrect results due to the use of outdated cached data.
Expected Behavior
We expect the system to:
- Automatically clear or update the cache when a new log space is added, ensuring that all subsequent requests can access the updated list of log spaces.
- Similarly, automatically clear or update the cache when a log space is deleted, avoiding the retention of information about spaces that have been removed.
Actual Behavior
Currently, the system does not update the cache promptly after adding or deleting log spaces, resulting in inconsistent data.