How to implement couchbase cache with Mysql Database in Golang

Hi Team, I am working on a requirement where i need to use Couchbase within the Golang webservice for caching services.
We have a MySql Database and Webservices in Golang. I need to do caching of MySQL records and return from Cache for repeated queries. How to do this? Is there any extension for coubase cache in GO SDK?

I am new to cache concept and have very minimal knowledge on it. My idea to implement above requirement is as below:

  1. Get records from MySql using golang webservices
  2. Upsert these records in couchbase cache programmatically in golang webservices
  3. When ever there is a request to get records, Check for record in couchbase cache if doesn’t exist cycle start again 1, 2, 3

Is this approach right? if No, Let me know right approach. Thanks.

I’m not sure what you mean by “golang webservices”, but it’s certainly intended to use Couchbase as a cache in this manner. In fact, we have a separate bucket type, the Ephemeral Bucket, which is optimized. There is no special extension, the golang SDK should work for you just fine.