Skip to content

Use an in memory cache to avoid frequent JSON ops and disk writes. #131

@earlAchromatic

Description

@earlAchromatic

Description

Proposing an enhancement to optimize our API data caching strategy, addressing performance issues related to file I/O and JSON processing.

Proposed Enhancement

  • Implement HTTP caching using headers like ETag and Last-Modified.
  • Create a separate caching module to manage in-memory and disk-based caching efficiently.
  • Enforce singleton pattern for the caching module to maintain state across the application.
  • Optimize file operations and JSON handling for better performance.
  • Document the caching strategy and ensure consistency across the team.

Goals

  • Improve performance by reducing unnecessary network traffic and data processing.
  • Enhance maintainability and scalability of the caching mechanism.

Next Steps

  • Select Node.js libraries for HTTP and in-memory caching.
  • Develop and integrate the separate caching module.
  • Update documentation with guidelines on caching module usage.
  • Implement tests and tooling to ensure adherence to new caching strategy.
  • Monitor performance impact after implementation.

It's possible this will be v1 compatible since we keep the disk cache, just use it less frequently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions