Does onebox gem cache the generic urls?

AI-generated summary

The discussion revolves around whether the onebox gem caches generic URLs, with users noting that caching does not occur by default. enigmaty raises the question, and sam suggests the caching behavior may be intentional. zogstrip supports the idea that leaving caching to the user allows better control and avoids hard-to-diagnose issues. sam agrees, expressing a desire to remove caching from the gem. techAPJ confirms this approach, stating that the gem no longer includes native caching, with changes to be deployed soon techAPJ.

I am using onebox gem. From my testing I see that the generic urls do not goes into cache (Redis in my case) is this by design or I am doing something wrong?

This is tricky, I am not sure this is the right place for “generic onebox” gem questions.

I am not sure what the correct desired default for the gem here is @techAPJ ?

Leaving the cache to the “user” of the gem allows for a more fine-grained control over what and how long things should be cached.

If the cache was hidden inside the gem, then it might lead to onebox bugs hard to diagnose due to caching issues.

Yeah we have a “caching” system inside onebox I kind of want to rip out. Let the consumers decide how and what to cache.

I agree with @zogstrip.

It’s on my low-priority list to rid onebox from moneta dependency. Will bump it on my list.

Onebox no longer has native caching as of this commit:

https://github.com/discourse/onebox/commit/8c61a33a6e4459fc267cecb7a2938fa58544bd55

I’ll deploy the changes here on meta early next week.