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 revisionPrevious revision
v5:userguide:learn_caching:cache_problems [2016/03/29 01:46] mnewnhamv5:userguide:learn_caching:cache_problems [2016/03/29 05:00] (current) – [Unexpected Results] mnewnham
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.1459208773.txt.gz · Last modified: 2017/04/21 11:40 (external edit)