Skip to content

New Feature - Read data from the RAM (don't always read the file content) #37

@samuelcarreira

Description

@samuelcarreira

I dug up a little inside the conf module code and appears to me that each get/read function call uses the fs readFileSync to get the data from the config file.
If I need to constantly check for a value from the app settings it can lead to performance issues. So my approach is to copy the settings to a global variable 👎 and only use this module to write the config file when some changes occur.

Are any alternative approach to this problem or do you plan to add a feature to kinda "cache the values" and only reads the file when there are some changes?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions