strapi-middleware-cache
strapi-middleware-cache copied to clipboard
WIP proposal to split into many adapters
This is a proposal to split this plugin into optional cache adapters.
Why?
- It makes the package smaller.
- It allows installing only necessary dependencies like ioredis, redis-lru.
- More scalable to implement alternative cache servers without increasing package size.
WIP
This is a proposal only, not fully implemented.
Good stuff, I like it ! 🚀
@stafyniaksacha has been migrating a whole bunch of Strapi things to Typescript, when that becomes more available the adapter packages could benefit from a typescript interface as well.
I like the idea too :)
Just a small niptipping, can we rename "strapi-middleware-cache-mem-adapter" to something like "strapi-middleware-cache-in-memory-adapter" to avoid confusing with "memcached" ?
I have some suggestions since we have lightly discussed making this a plugin for v4 (in which case the package would be renamed to strapi-plugin-cache
)
Likewise since we (Strapi) use the strapi-provider-*
syntax (for v4 they will actually be @strapi/provider-*
) I would suggest we follow a similar syntax.
Other than that I totally think this is a fantastic idea. A fellow community member @mattiebelt is working on a search plugin that is planning to use this same structure.
(I might suggest hold off on merging this until we figure out how best to rewrite this for v4 though)
Likewise since we (Strapi) use the strapi-provider-* syntax ...
👍 Totally agree
(I might suggest hold off on merging this until we figure out how best to rewrite this for v4 though)
May we start creating an RFC for this plugin ? (I plan to work again on this in one or two weeks)
Likewise since we (Strapi) use the strapi-provider-* syntax ...
+1 Totally agree
(I might suggest hold off on merging this until we figure out how best to rewrite this for v4 though)
May we start creating an RFC for this plugin ? (I plan to work again on this in one or two weeks)
For sure, please feel free. I should be free to discuss later this week after the v4 stable release.
Hello @agutoli !
I have implemented the provider system for the V4 release here: https://github.com/patrixr/strapi-middleware-cache/tree/feature/strapi-v4/packages
Please feel free to give your feedback!