If the information is created just once and then used across multiple
requests, it'll be a lazy val in a singleton
If it's request-dependent then it'll be a singleton extending RequestVar
Sadly, the OP didn't specify what was needed :(
On Sat, Sep 26, 2009 at 2:35 PM, Timothy Perrett
<tim...@getintheloop.eu> wrote:
>
> Take a look at RequestVar... If he were to just use a object singleton
> he might end up being not thread safe.
>
> Cheers
>
> Tim
>
> Sent from my iPhone
>
> On 26 Sep 2009, at 14:05, Kevin Wright <kev.lee...@googlemail.com>
> wrote:
>
>>
>> You could always try putting your lazy val inside a singleton object
>>
>> On Sat, Sep 26, 2009 at 8:14 AM, ishiijp <yoshino...@gmail.com>
>> wrote:
>>>
>>> Hi.
>>>
>>> If my lift application have some data that cost to create, and I want
>>> to share it among snippets, how to do in Lift?
>>>
>>> if such data are shared inside one snippet, I may use "lazy val".
>>> But I have no nice idea to share it among different snippts.
>>>
>>> Thanks much.
>>>
>>>>
>>>
>>
>> >
>>
>
> >
>
Thank you for your example, David.
It will work in my purpose.
It seems that my poor English and less information let some people
confused.
I need just a request scope data.
It means I want to share information between snippets across a
request.
(Is the expression "request scope" not good for in this case...?)
Why don't we make Esperanto the official Lift language?

Call me old fashioned, but good ol' English seems to be quite
prevalent these days ;-)
On 5 Oct 2009, at 17:02, Jack Widman wrote:
> Why don't we make Esperanto the official Lift language?
Cheers, Tim
Nor I, but I'm certain that Turing was (Queen's) English complete... :)
On Mon, Oct 5, 2009 at 10:54 PM, Jack Widman <jack....@gmail.com> wrote:
> I'm not sure English is Turing Complete. Also not sure how prominent it will
> be in 50 years ... :)
> On Mon, Oct 5, 2009 at 5:51 PM, David Pollak <feeder.of...@gmail.com>
> wrote:
>>
>>
>> On Mon, Oct 5, 2009 at 9:35 AM, Timothy Perrett <tim...@getintheloop.eu>
>> wrote:
>>>
>>> Call me old fashioned, but good ol' English seems to be quite
>>> prevalent these days ;-)
>>
>> Is this the Queen's English? ;-)
>>
>>>
>>> On 5 Oct 2009, at 17:02, Jack Widman wrote:
>>>
>>> > Why don't we make Esperanto the official Lift language?
>>>
>>>
>>>
>>
>>
>>
>> --
>> Lift, the simply functional web framework http://liftweb.net
>> Beginning Scala http://www.apress.com/book/view/1430219890
>> Follow me: http://twitter.com/dpp
>> Surf the harmonics
>>
>>
>
>
>
> --
> Jack
>
> >
>