caching – is it possible to cache a local file to Nginx

I don’t know it is relate with Nginx or not.
What I want to do is, my frontend web server is only running Nginx and there is a (Nginx-lua-modules)Lua script which is retrieving some data from backend server and save to a file on frontend web server.

Now I need to cache that file on memory for 60min or 24hr or etc.. but there is only Nginx is running.
So, is it possible to cache from Nginx through Lua script.