pressbooks / pressbooks-stats

A Pressbooks plugin which provides some basic activity statistics for a Pressbooks network.
https://pressbooks.com
GNU General Public License v3.0
4 stars 2 forks source link

Cache dashboard, avoid running queries. (fix #3) #6

Closed dac514 closed 7 years ago

dac514 commented 7 years ago

There is a new bin/cache.php file that can be setup as a cron job, it should be run like this:

wp eval-file bin/cache.php

This will store the rendered html into a transient, and will avoid running the SQL unnecessarily.

Other ways that we could optimize:

codecov[bot] commented 7 years ago

Codecov Report

Merging #6 into dev will not change coverage. The diff coverage is 0%.

Impacted file tree graph

@@        Coverage Diff        @@
##           dev    #6   +/-   ##
=================================
  Coverage    0%    0%           
=================================
  Files        2     2           
  Lines      297   278   -19     
=================================
+ Misses     297   278   -19
Impacted Files Coverage Δ
inc/stats/namespace.php 0% <0%> (ø)
inc/helpers/namespace.php 0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cdf4c0f...8b78638. Read the comment docs.