pardon me, for not explain it more clearly, when i put *cache = (cache.ram,
60)* the new data is not show immediately after i inserted it, after a few
minutes, it will appears, but when i delete *cache = (cache.ram, 60)*, the
new data is show immediately after i inserted it. is it the behaviour of
cache or there is something wrong in my code function?

please give an advice, thanks.

best regards,

steve van christie


On Thu, Apr 14, 2011 at 7:25 AM, Anthony <[email protected]> wrote:

> How do you know it's not working? What behavior are you observing?
>
> On Wednesday, April 13, 2011 8:20:25 PM UTC-4, 黄祥 wrote:
>
>> yes, i've tried to implement the code from that url.
>> here is my function :
>>
>> models/db_functions.py:
>>
>>  def __index(table):
>> if len(request.args):
>> page = int(request.args[0])
>> else:
>> page = 0
>> items_per_page = 20
>> limitby = (page * items_per_page, (page + 1) * items_per_page + 1)
>> rows = db().select(table.ALL, limitby = limitby, cache = (cache.ram, 60))
>> return dict(rows = rows, page = page, items_per_page = items_per_page)
>>
>> and my controller :
>> controllers/book.py
>>
>>  # coding: utf8
>>
>> table = db.author
>>
>> def index():
>> return __index(table)
>>
>> please give a suggestion or advice for this?
>>
>> thank you so much in advance
>>
>> steve van christie
>>
>

Reply via email to