RenderCache - Lightweight Streaming Cache

Back to home
Click me!
About

Render Cache is a lightweight/perfomant way to Load and Unload things from render.
It uses the same methods as PartCache or ObjectCache but in a diffrent way.
Every update happens without yielding in one frame.
There’s no need for waiting for a part to load before you can use it in the next update.

API
local CollectionService = game:GetService("CollectionService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RenderCache = require(ReplicatedStorage:WaitForChild("RenderCache"))

local Cache = RenderCache.new()

local Parts = CollectionService:GetTagged("RenderCacher")

Cache:Register(Parts) -- Register original positions of parts
Cache:ReRegister(Parts[1]) -- Update original position of part

while true do
	task.wait(1 / 10)
	for i, v in pairs(Parts) do
		Cache:Unload(v) --Add to parts that should unload next update
	end
	Cache:Update() --Update the position of parts
	task.wait(1 / 10)
	for i, v in pairs(Parts) do
		Cache:Load(v) --Add to parts that should load next update
	end
	Cache:Update() --Update the position of parts
end
Links
9 Likes

I will finish it in like 5-6 hours because I am busy right now.

1 Like

Model link is down, Privated or moderated.

Did you implement this into “Cull”?

not yet
filler text aaaaafghfghhfgfgh

nope its not privated, its roblox issue