markwatkinson / luminous

Accurate and powerful syntax highlighting library
http://luminous.asgaard.co.uk
GNU Lesser General Public License v2.1
51 stars 5 forks source link

SQL cache optimisation #19

Closed markwatkinson closed 12 years ago

markwatkinson commented 12 years ago

If I recall correctly, the SQL cache runs a clean-up query every time it's read from (or was it written to?). In any case, running this so often is going to slow things down unnecessarily, and it might be better for large caches if we reserved a single row to store the date of the last clean-up and only run it once a day or so.