Thank you for your comments.
There are 4 mechanisms for pesistance:
1) database
2) cache (ram, disk, memcache)
3) session
4) cookies
If you want to store in server ram memeory you should use cache.ram.
cache.ram cache the output of a function and the object cached needs
to a name (key). For example
import time
def f(): return time.time()
t=cache.ram("mytime",f,5000)
5000 is the expiration time of the cached object.
Not sure I answered the question.
Massimo
On Oct 28, 9:48 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> What's the best way for me to have a custom object that persists
> between page requests?
>
> I'm using a web2py as a client app that reads barcodes off a RS232.
> To do this I'd like to use server-push with long-polling AJAX. It
> seems wasteful, though, to reconnect to the COM port after each AJAX
> request completes and the next one immediately kicks off.
>
> BTW, web2py is an awesome piece of code.
>
> Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---