Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update VisitCount & InfoCount every 10 seconds #195

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Man-RP
Copy link
Collaborator

@Man-RP Man-RP commented Jun 27, 2021

Hey,
I've added a non-living updates cache to PostgresStorage driver.
Every call to incInfoCount or incVisitCount methods instantly increases a temporary id counter.
Every 10 seconds, the cache is checked. if it isn't empty, all counters inside are flushed.

closes #15

@Man-RP Man-RP marked this pull request as ready for review June 27, 2021 11:55
.env.development Outdated Show resolved Hide resolved
src/services/storage/drivers/postgres/types.ts Outdated Show resolved Hide resolved
src/services/storage/drivers/postgres/index.ts Outdated Show resolved Hide resolved
src/services/storage/drivers/postgres/index.ts Outdated Show resolved Hide resolved
src/services/storage/drivers/postgres/index.ts Outdated Show resolved Hide resolved
src/services/storage/types/url.ts Show resolved Hide resolved
@Man-RP Man-RP self-assigned this Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the database updates more performant
3 participants