How to read from cache only using onebox gem?

I am using onebox as standalone gem. In my use case I want to read from cache only. Is there an easy way to fetch urls from cache only without any network hit?

I am using Rails 5.1.

Thanks.

While the onebox gem has an internal cache, it’s best for the user of the library to handle what should be cached and for how long.

إعجابَين (2)