ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:userguide:learn_caching:cache_problems

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
v5:userguide:learn_caching:cache_problems [2016/03/29 01:46]
mnewnham
v5:userguide:learn_caching:cache_problems [2016/03/29 05:00] (current)
mnewnham [Unexpected Results]
Line 9: Line 9:
   SELECT code,​description FROM table ORDER BY code ASC   SELECT code,​description FROM table ORDER BY code ASC
   ​   ​
-Whilst the result set produced by the query in both queries would be exactly the same, because the checksum ​of the queries are different, they would not return the same cached query. The easiest way to avoid such errors is to define constants for cacheable ​queries and reuse them as such+Whilst the result set produced by the query in both queries would be exactly the same, because the checksums ​of the queries are different, they would not return the same cached query. The easiest way to avoid such errors is to define constants for queries and reuse them as such
 <code php> <code php>
 DEFINE ('​CACHED_RESULT',​ '​SELECT code,​description FROM table ORDER BY code ASC'); DEFINE ('​CACHED_RESULT',​ '​SELECT code,​description FROM table ORDER BY code ASC');
v5/userguide/learn_caching/cache_problems.txt ยท Last modified: 2016/03/29 05:00 by mnewnham