Creating custom cache adapters

Hello, I am having issues creating my own redis cache adapter for Ghost.

You can see my repo here: GitHub - bensoer/ghost-cache-adapter-redis: Redis Caching adapter for Ghost
Main index.ts here: ghost-cache-adapter-redis/index.ts at master · bensoer/ghost-cache-adapter-redis · GitHub

As of currently, it does not work. My issue though is I’m not having much luck finding resources or where to start to try and figure it out. Cache adapters from my github searches so far don’t seem to be popular :laughing:

The adapters section describes configuring and setting up the Cache adapter in 2 different ways: Configuration - Adapt your publication to suit your needs

This is also an experiment trying to create the adapter in typescript. I haven’t been able to figure out what ghost is normally written in, or what it expects when it’s calling its adapters (ES5 ? 6 ?)

My question here is rather broad, but I’m hoping for some help if someone could answer:

  • Where are some resources on how to create custom cache adapters ? Examples ? Own Knowledge ? Or knowledge of what documentation is correct ?
  • Other locations to get more information on how Ghost works towards solving this ?

Im new to working with ghost, is digging through the code is really my only option ? Could someone maybe help give me a pointer on where might be a place to start digging ?

Thank you