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 view count dynamic update #2285

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

obiPlabon
Copy link
Collaborator

@obiPlabon obiPlabon commented Mar 19, 2025

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • New Feature

Description

Due to page caching view count doesn't update. So an ajax request is sent on page load. The request will get the latest count and will cache it for 5 hours, and once invalidated it'll send the ajax request again.

Any linked issues

Fixes #

Checklist

@obiPlabon obiPlabon requested a review from vairafiq as a code owner March 19, 2025 06:27
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While sites don't have any caching system, it may not be required stored on localStorage. We can provide an option to enable/disable this feature.

In the first load, a listing shows count 2, and when the Ajax version comes it goes to 0. please check this SS: https://prnt.sc/uOMR_VJArAcC

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.

2 participants