> On 10 Oct 2014, at 12:46, Gunnar Farnebäck <gun...@lysator.liu.se> wrote:
> 
> I wrote this when I wanted to cache the results of matread. Your problem 
> sounds like it could be similar.
> 
> let matread_cache = (String => Any)[]
>     global caching_matread
>     function caching_matread(filename)
>         if !haskey(matread_cache, filename)
>             matread_cache[filename] = matread(filename)
>         end
>         return matread_cache[filename]
>     end
> end

Looks pretty useful -- thanks!

Reply via email to