这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Conversation

@harudark
Copy link
Contributor


Description

var cacheObj = cache.New("web", 100) is a cache for web requests. For some heavy Graphite queries, due to the existence of cache, the memory used by json unmarshalling cannot be released for long time.
Create a schedule task to clear the cache.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

This has been running with the following configuration in production.

......
# Enable scheduled web cache clear task. Default is false.
ScheduledClearWebCache = true

# The frequency of scheduled web cache clear task. Default is "24h".
ScheduledClearWebCacheDuration = "24h"
......

Checklist:

  • This contribution follows the project's code of conduct
  • This contribution follows the project's contributing guidelines
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

For some heavy Graphite queries triggered from web, due to the existence of cache,
the memory used by json unmarshalling cannot be released.
Create a schedule task to clear the cache.
@stale
Copy link

stale bot commented Sep 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 16, 2022
@stale stale bot closed this Oct 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant