Is there any way to have global variables or global data in v8cgi?
--
You received this message because you are subscribed to the Google Groups "v8cgi" group.
To post to this group, send email to v8...@googlegroups.com.
To unsubscribe from this group, send email to v8cgi+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/v8cgi?hl=en.
But global object is per HTTP request right?
So will the data stored in global object will be preserved across the
requests?
Even if we use reuse_context functionality, still for each request,
all the global object properties get clears.
- Nilima
On Aug 27, 8:12 pm, Ondřej Žára <ondrej.z...@gmail.com> wrote:
> 2010/8/26 Nilima Chavan <nilima.cha...@gmail.com>
>> > v8cgi+un...@googlegroups.com <v8cgi%2Bunsu...@googlegroups.com>.
> > Is there any way to have global variables or global data in v8cgi?
>
> Yes, by writing "global.myVariable = 123;"
>
> Note, however, that global variables are generally considered a bad
> practice.
>
> Sincerely,
> Ondrej Zara
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "v8cgi" group.
> > To post to this group, send email to v8...@googlegroups.com.
> > To unsubscribe from this group, send email to
--
You received this message because you are subscribed to the Google Groups "v8cgi" group.
To post to this group, send email to v8...@googlegroups.com.
To unsubscribe from this group, send email to v8cgi+un...@googlegroups.com.
2010/9/15 Nilima Chavan <nilima...@gmail.com>But global object is per HTTP request right?
So will the data stored in global object will be preserved across the
requests?
Even if we use reuse_context functionality, still for each request,
all the global object properties get clears.
Yes, exactly. In CGI scenario, for instance, every request means new single v8cgi process - there is no universal, reliable and generic way to preserve data across requests. An optimal solution seems to be memcached...
Sincerely,
Ondrej Zara
- Nilima
On Aug 27, 8:12 pm, Ondřej Žára <ondrej.z...@gmail.com> wrote:
> 2010/8/26 Nilima Chavan <nilima.cha...@gmail.com>
>
> > Is there any way to have global variables or global data in v8cgi?
>
> Yes, by writing "global.myVariable = 123;"
>
> Note, however, that global variables are generally considered a bad
> practice.
>
> Sincerely,
> Ondrej Zara
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "v8cgi" group.
> > To post to this group, send email to v8...@googlegroups.com.
> > To unsubscribe from this group, send email to
--
You received this message because you are subscribed to the Google Groups "TeaJS (formerly v8cgi)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to teajs+un...@googlegroups.com.
To post to this group, send email to te...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/teajs/f08dd73b-0b34-48d6-ada7-03e2e17c08f0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.