Introducing CacheService | A well-made Cached framework (Cached Datastores, Thread controlling and more!)

Documentation and Installation: https://cacheservice.readme.io/docs/getting-started
Introducing the CacheService (Roblox Cache Framework) - an advanced system designed to optimize data storage, retrieval, and replication in Roblox games. This powerful framework incorporates cached datastore saves with datastore session locking, providing enhanced performance and security. With an array of useful functions, including a clean cache feature and client replication capabilities, it empowers developers to streamline their game’s data management process.

At the core of the CacheService lies its cached datastore saves with datastore session locking mechanism. This feature leverages the power of caching to minimize the number of expensive datastore calls, significantly reducing latency and improving overall game performance. Additionally, the framework implements session locking to ensure data integrity, preventing concurrent data modification conflicts.

One of the standout features of the framework is the clean cache function. With a single command, developers can completely clear the cache, closing any Roblox-created threads or connections and deleting associated user data values. This functionality is invaluable for scenarios where a fresh start or data refresh is necessary, saving development time and eliminating potential data inconsistencies.

Moreover, the CacheService offers robust client replication capabilities. It enables efficient and secure data synchronization between the server and clients, ensuring that all connected players receive the most up-to-date information. With this feature, game developers can effortlessly replicate essential data, such as player attributes, inventory, or game state, to the client, providing a seamless and immersive experience for players.

Beyond these core functionalities, the framework provides a plethora of additional useful functions and utilities. These include data serialization and deserialization methods for seamless storage and retrieval of complex data structures, efficient cache expiration and refreshing mechanisms, error handling and logging functionalities, and customizable event hooks for easy integration with existing game systems.

In summary, the CacheService is a comprehensive solution for optimized data management in Roblox games. Its cached datastore saves with datastore session locking ensure enhanced performance and data integrity, while the clean cache function allows for quick resets and data purging. Combined with client replication features, this framework empowers developers to create robust and responsive game experiences.

12 Likes

Please Note: This is a fairly new framework. I did a lot of test before release. If there are any suggestions of fixes that need to be presented. I will make updates ASAP.

2 Likes

This looks really interesting! Would there be any possibility of supporting ordered datastores in the future?

2 Likes

The link you sent just shows This site can’t be reached.

3 Likes

can u also upload the .lua files not only the .rbxm? so i can look the source without openning roblox studio.

2 Likes

I did a pull request on the repo (I also credited you for that)

2 Likes

Thank you for this. I was stressed yesterday because my documentation website paywalled me. I worked like 3 hours on it. I didn’t have much time to do all this. Thank you I merged it.

1 Like

Update: Read me gave me open-source access so now we have working documents. Keep in note this is beta so any issues please let me know and I will be sure to fix them

1 Like

Why did you link the wrong repo?

1 Like

What the actual heck?! I just made a module similar to this (Excluding the Datastore part), where stuff can be replicated to the client and and crap. This module is so much better tho so I’m so tempted to use it :sob:, I’m just really mad that I pretty much made my code for nothing.

Anyways, in all seriousness, this is genuinely an amazing module. THANK YOU SO MUCH FOR THIS! It makes lives so much easier!!

PS: You linked the wrong repository on the documentation website!

1 Like

Oh I just now realized. Thank you for telling me fixing now

3 Likes

Out of all the discord servers to send this in why did you choose RoDevs. You could have chosen any other server besides RoDevs maybe like Hidden Developers and it would have been better a choice the people in rodevs probably cant even write basic English sentences without making a spelling mistake or an error. Why would you waste your time on them. It’s not worth it imo.

1 Like

I know bro, I just post it everywhere. Rodevians are annoying though

Tbh, if you didn’t post it in RoDevs I wouldn’t have noticed it lmao

I prefer things being sent everywhere too just so more people can see (Even though I have other Roblox dev discords, I mostly use RoDevs)

Also, just a feature suggestion, but perhaps for the OnUpdate function… would you be able to make it also include the table of values that were changed/added/removed if even possible? I imagine that it shouldn’t be too hard to do hopefully and that we should be able to just do a comparison with the list of changes to the new cache to see what actually happened to said values.

Good suggestion ill be sure to keep this in mind!

There seems to be an issue with using FindValue and FindEntry on the client. It complains about how no such cache/table exists and from my research on the module, it gets the cache from a table named LocalCache, and when using a print, the table is completely empty. However the cache does exist on the server and the “Replicate” property is true. I’m able to use OnUpdate on the cache from the client, I just can’t find any values or entries without it erroring. Might this be an issue on my end or the module?

I thought at first the functions just couldn’t be used on the client but it directly states in the wiki you can.

Hey, thank you for informing me of this issue, could you private message me the error and the code trying to use it.

Update: New functionality added and fixes

What are these “fixes” and “functionality”?