Hi,
I'm looking for a way to use cached select facilities outside web2py
context.
I use DAL as a standalone package for a desktop application which does not
require the full stack web2py framework.
The cache module seems to be bound to the globals object "request".
what I tired to do so far:
from gluon.dal import DAL,Field
from gluon import cache
...
table def ... etc...
def getObjectParent(self,aRow):
db=self.db
#0.138999938965
query=(db.object_object_relationship.object_B_id==aRow)\
&(db.object_object_relationship.f_type=='parent_child')\
&(db.object_object_relationship.object_A_id==db.Pt_object.id)
return
db(query).select(db.Pt_object.ALL,cacheable=True,cache=(cache.CacheInRam,3600),)
---> time_expire)
TypeError: __init__() takes at most 2 arguments (4 given)
Many thanks for any help,
Best regards,
Fabrice.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.