Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can someone explain to me a little about CacheableContentProvider?

CacheableContentProvider


I was looking through the Roblox Wiki API page when I accidentally clicked upon this link:

http://wiki.roblox.com/index.php?title=API:Class/CacheableContentProvider

I was hoping that someone wouldn't mind explaining what this is and how one can use it. I did a quick Google search on it and found literally nothing.

It also happens to have three sub-classes:

MeshContentProvider

SolidModelContentProvider

TextureContentProvider


This class doesn't even have it's own specific functions or properties. Everything it inherits is from the Instance class: Functions, Properties, YieldFunctions, and Events.

Even one of it's subclasses, TextureContentProvider, has it's own unique function:

void SetCacheSize ( int count )


Instance

Instance.new("CacheableContentProvider",workspace)

I also attempted to Instance this into workspace but got:

23:29:06.789 - Unable to create an Instance of type "CacheableContentProvider"


It isn't any type of service either!

print(game:GetService("CacheableContentProvider"))
--nil

In simple words... What is this?

2 comments

0

Maybe it's something like "BasePart". BasePart is a part but a part is not a BasePart.

0

The -Able would suggest that it's a "superclass", and so might be a thing that several services are, but isn't a thing per se on its own.

2 answers

✓ Accepted answer

CacheableContentProvider is just a base class that other classes inherit. Although there are no visible Lua methods in the API, in the C++ code(which is what the ROBLOX client is written in) there are methods that do stuff behind the scenes, which is why the class is needed.

Its is used by Roblox corescripts, it simply is a cache function, if they call it and the item already has been callled it gets it from the cache, however if its new roblox with cache it. There is no way to cache stuff as roblox does it automatically

This discussion is preserved as it was. New answers, comments, and votes are closed.