Lafcadio 0.7.0: Excessively Clever Query Caching

Lafcadio 0.7.0, the new development release, is out. It adds my first try at Excessively Clever Query Caching.

Excessively Clever Query Caching goes like this: Everytime you run a select against the DB, Lafcadio caches the results in memory. Then, if you later run a second select that is a subset of the first, Lafcadio detects it, figures out what it’s a subset of, filters out the results in memory, and returns you the results. This all happens transparently.

What does this mean? It means a significantly faster app, because if you run these three queries:

select * from users where lname = 'Smith'
select * from users where lname = 'Smith' and fname like '%john%'
select * from users where lname = 'Smith' and email like '%hotmail%'

Lafcadio will only ask MySQL for the results for the first select statement, and do the rest for you without using the DB connection.

blog comments powered by Disqus

« Previous post

Next post »