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

Have stats on open site cached for 24 hours #213

Open
josieg opened this issue Sep 3, 2019 · 2 comments
Open

Have stats on open site cached for 24 hours #213

josieg opened this issue Sep 3, 2019 · 2 comments

Comments

@josieg
Copy link

josieg commented Sep 3, 2019

Is your feature request related to a problem? Please describe.
The stats pages on the OpenEd website are slow to load because they are updated whenever the site is accessed.

Describe the solution you'd like
I would like the stats on the open site to cache and be refreshed once every 24 hours.

@josieg
Copy link
Author

josieg commented Sep 9, 2019

Lauri has asked that I label this issue "urgent" because:

"I was reminded of the inaccessible nature of this page during a discussion I had with Tannis on Friday when I showed her the new section of the Adoption Guide that refers to this page, and Tannis couldn't get to that page."

@alex-418
Copy link
Contributor

Currently working on moving the stats configuration to a new server, this should help alleviate some of these concerns.

Caching Functionality in current application:
The application itself currently tries to cache the stats data with an 8 hour refresh interval, but as you have noted, this is not working as expected, and is not very efficient. The reason for the slow load is because it requires someone to visit the page to make the very large API request to matomo, parses that request (so we can do some logic with it), and then generate the cache files for local storage... only after all of this is completed, the page loads for users.

Solution:
The solution requires refactoring or replacing the caching functionality along with the associated application logic (a big task because it has dependencies). Would like to scope out exactly what the requirements are around stats on the open site, and craft a solution that requests and caches only that specific data we need from the Matomo API. This should improve the performance of this page.

New front-end:
I should also note we're likely going to be working on a replacement front-end for this application, as part of an effort to use a modern technology stack and a development methodology to avoid these types of issues in the future.

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

No branches or pull requests

2 participants