��设置为 5 秒。</p>
<pre># Memory cache entry life time specified in seconds.
# 0 means infinite life time. 0 by default.
memqcache_expire = 5
</pre>

<p>修改这个参数的值后，重启 pgpool。</p>

<h4 id="expire_try">Try</h4>

<p>确认你可以从缓存中获得 SELECT 语句的结果。</p>
<pre>test=&gt; SELECT * FROM table_cache_ok WHERE a = 1;
LOG:   <b>query result fetched from cache.</b> statement: SELECT * FROM table_cache_ok WHERE a = 1;
</pre>

<p>等 5 秒钟...</p>

<p>再次执行