| ADOdb Library for PHP Manual | ||
|---|---|---|
| Prev | CacheSelectLimit | Next |
Similar to SelectLimit, except that the recordset returned is cached for $secs2cache seconds in the $ADODB_CACHE_DIR directory.
Since 1.80, $secs2cache has been optional, and you can define the caching time in $connection->cacheSecs.
$conn->Connect(...);
$conn->cacheSecs = 3600*24; // cache 24 hours
$rs =
$conn->CacheSelectLimit('select
* from table',10);
CacheSelectLimit() rewrites the SQL query, so you won't be able to pass the SQL to CacheFlush. In this case, to flush the cached SQL recordset returned by CacheSelectLimit(), set $secs2cache to -1:
$db->CacheSelectLimit(-1, $sql, $nrows);
| Prev | Home | Next |
| SelectLimit | Up | CacheFlush |