Hello! I want to cache my data and not to hit remote services with each client request. As I understand I need something like thismodule Acmeclass Appattr_accessor :cacheddef initialize@cached = SomeService.fetch('unique-key')enddef call(env)puts env.classresponse = Pease::API.call(env)endendclass API < Grape::APIformat :jsonget :ping doAcme::App.cachedendendendHow do I do this? In general I would like to create a separate class that will take care of all data that can be demanded by the client and consumed via API.--
You received this message because you are subscribed to the Google Groups "Grape Framework Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-grape+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
dB. | Moscow - Geneva - Seattle - New York
dblock.org - @dblockdotorg