So i'm making a cache system to optimize server->client recieved kb/s. I need a cache system because my game is planned to be very dynamic (new VFX being generated on the fly), and the idea is that the server has an array of up to 255 items (8 bit number since storing 65,536 items would be wayyy too much for roblox's potatoes), and whenever the server gets a new cache item it just sends it to the client where it is also cached. For every cache item, a 5 minute timer is set, and if it's not pushed out of the array before the timer's up, the item is deleted.
Problem? many operations will require searching through the whole cache and then searching to see if two tables have equal values. And if I've learned anything from recreating wolfenstein 3d like 5 times, it's that if statements can be pretty expensive.
So I need some efficient method of searching through the entire cache to find a table that's equal to a given table.