webcoderspeed / speed-cache

A caching library with admin panel feature
2 stars 1 forks source link

Prevent exposing of db functions for global use #5

Closed webcoderspeed closed 2 years ago

webcoderspeed commented 2 years ago

Explanation - If we don't prevent then inner functions for db interaction directly which is not good

Stop exposing following function

ashishk1331 commented 2 years ago

Closures can help in making the functions private and hence limiting their scope.

webcoderspeed commented 2 years ago

@hugekontrast you wanna try it

ashishk1331 commented 2 years ago

I would love to give it a shot! However, I don't have any experience with typescript. I've been doing all things in pure javascript up till now.

xJQx commented 2 years ago

I can work on it!

webcoderspeed commented 2 years ago

@hugekontrast https://github.com/webcoderspeed/speed-cache/issues/3 you can this one. just do the documentation like this https://www.npmjs.com/package/redis

ashishk1331 commented 2 years ago

Okay! I'll try to do the documentation, then.