Skip to content
This repository was archived by the owner on Aug 14, 2025. It is now read-only.

fix(cache): enhance cache management#244

Open
golnar-boosty wants to merge 39 commits intomasterfrom
fix/cache-issue
Open

fix(cache): enhance cache management#244
golnar-boosty wants to merge 39 commits intomasterfrom
fix/cache-issue

Conversation

@golnar-boosty
Copy link
Collaborator

PR Description:

This pull request introduces significant improvements to cache management, refactors error handling, and resolves a genesis initialization issue. Key updates include:

1- Cache Management Enhancements:
Rfactored AddCache function to introduce better handling of cache directories and file management.
Implemented a size limit (2GB) for the cache directory, with automatic cleanup of old files when the limit is exceeded.
Added folder size monitoring using a streamlined utility to calculate directory size.
Simplified the GetCache logic with enhanced error handling for cache misses and malformed data.
Introduced a cachedDuration function to check and manage cache expiration based on a 5-block duration.
Enhanced searchcache functionality.
Improved logging to provide consistent and detailed debugging information across all cache operations.

2- Refactor and Cleanup:
Organized error handling for better maintainability and readability.
Streamlined the implementation of logging, ensuring clarity and consistency.
Remove and cleanup unused old codes which need tp pass to the tasks and optimized them.

3- Bug Fixes:
Resolved an issue in the genesis setup process that was causing initialization failures in specific scenarios.
Improved stability by addressing edge cases during the genesis configuration.
These changes collectively enhance the performance, reliability, and maintainability of the system, especially in managing cached data and handling initialization processes.

4- Testing Instructions: Deploy the branch to the devnet environment and monitor its behavior to confirm that the crashing points have been resolved. Ensure to test the following scenarios:
Validate the cache management functionality under load.
Observe system stability and log outputs for any anomalies.

5- Run Command :
interxd start --verbose (printing cache)
interxd start (without printing cache)

golnar-boosty and others added 23 commits November 19, 2024 18:11
Implemented a revised directory structure for caching to improve scalability and organization. This update simplifies cache management and enhances readability for future development.
…er performance

Removed background tasks that were no longer in use to streamline the application. Updated the design to improve overall system performance and reduce resource consumption.
Revised error handling mechanisms to make them more robust and easier to maintain. Organized log structures for better readability and debugging efficiency.
….Replaced PutCache with AddCache to include cache size checks and automated cleanup. Introduced folder size monitoring with a 2GB limit and a mechanism to clear old cache.Simplified GetCache logic for cache misses and error handling. Added functionality to check cache expiration based on a 5-block duration.Refactored logging for better debugging and consistency.
…oblems during genesis setup. Ensured proper handling of edge cases to improve stability.
@github-actions
Copy link

This repository does not accept pull requests from non version branches.
--- Please CLOSE this PR after acknowledging the issue ---

@github-actions github-actions bot added the invalid This doesn't seem right label Jan 12, 2025
@github-actions github-actions bot locked as spam and limited conversation to collaborators Jan 12, 2025
@github-actions
Copy link

This repository does not accept pull requests from non version branches.
--- Please CLOSE this PR after acknowledging the issue ---

@github-actions github-actions bot unlocked this conversation Jan 12, 2025
@github-actions github-actions bot locked as spam and limited conversation to collaborators Jan 12, 2025
@github-actions github-actions bot locked as spam and limited conversation to collaborators Jan 20, 2025
@golnar-boosty golnar-boosty requested a review from MrLutik January 20, 2025 14:47
@github-actions github-actions bot unlocked this conversation Jan 27, 2025
@github-actions
Copy link

This repository does not accept pull requests from non version branches.
--- Please CLOSE this PR after acknowledging the issue ---

@github-actions github-actions bot locked as spam and limited conversation to collaborators Jan 27, 2025
@golnar-boosty golnar-boosty changed the title Fix/enhance cache management and refactor genesis initialization fix(cache): enhance cache management Jan 27, 2025
@github-actions github-actions bot unlocked this conversation Jan 27, 2025
@github-actions
Copy link

This repository does not accept pull requests from non version branches.
--- Please CLOSE this PR after acknowledging the issue ---

@github-actions github-actions bot locked as spam and limited conversation to collaborators Jan 27, 2025
@github-actions github-actions bot unlocked this conversation Jan 27, 2025
@github-actions
Copy link

This repository does not accept pull requests from non version branches.
--- Please CLOSE this PR after acknowledging the issue ---

@github-actions github-actions bot locked as spam and limited conversation to collaborators Jan 27, 2025
@github-actions
Copy link

This repository does not accept pull requests from non version branches.
--- Please CLOSE this PR after acknowledging the issue ---

@github-actions github-actions bot unlocked this conversation Jan 31, 2025
@github-actions github-actions bot locked as spam and limited conversation to collaborators Jan 31, 2025
@github-actions github-actions bot unlocked this conversation Jan 31, 2025
@github-actions
Copy link

This repository does not accept pull requests from non version branches.
--- Please CLOSE this PR after acknowledging the issue ---

@github-actions github-actions bot locked as spam and limited conversation to collaborators Jan 31, 2025
@github-actions github-actions bot unlocked this conversation Feb 3, 2025
@github-actions
Copy link

github-actions bot commented Feb 3, 2025

This repository does not accept pull requests from non version branches.
--- Please CLOSE this PR after acknowledging the issue ---

@github-actions github-actions bot locked as spam and limited conversation to collaborators Feb 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants