[erlang-questions] How to not cache a certain function in yaws

Salonee Sinha Roy <>
Mon Mar 2 15:53:11 CET 2009


I have a web app in yaws. A part  the code is supposed to randomly generate
a temp string using the following code.

genname(0, L) -> L;
genname(N, L) ->
    R = random:uniform(123),
    case isalphanum(R) of
    true -> genname(N-1, [R|L]);
    false -> genname(N, L)
end.

Each time I call genname(8,[]), I want to generate a different string.
However because of the caching behavior of yaws ( I think ), each time I
call genname(8,[]), it always returns the same string. Is there a way I can
change this.

Any help would be appreciated
Thanks in advance
Salonee.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090302/e7b1bda0/attachment.html>


More information about the erlang-questions mailing list