Thanks for the hint. I did not notice MEMDB.

But, too bad that it does not work either.

Traceback (most recent call last):
  File "gluon/main.py", line 323, in wsgibase
  File "gluon/globals.py", line 313, in _try_store_in_db
  File "gluon/contrib/memdb.py", line 250, in insert
  File "gluon/contrib/memdb.py", line 285, in _create_id
AttributeError: 'CacheInRam' object has no attribute 'incr'

It seems the memdb.py does not wrap enough interface to simulate a db?

On Apr6, 1:04pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> I think...
>
>     from gluon.contrib.memdb import MEMDB
>     session.connect(request, response, db=MEMDB(cache.ram))
>
> On Apr 5, 11:14 pm, Iceberg <iceb...@21cn.com> wrote:
>
> > Hi, does anyone know, is there a way to store session in memory? Even
> > this means sessions will be lost if web2py restarts, but that is fine
> > for some non-critical apps. Besides, this way we don't need to worry
> > about cleaning up the old sessions anymore. And perhaps slightly
> > faster.
>
> > I have tried these in models/db.py but failed.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to