Cache and Custom Room Property Limits

-- The docs state there is a limit on the total number of cached events in a room (global cache plus actor caches). What is the value of that limit?

-- Is there a total cache size limit as well?

-- What is the size limit for custom room properties?

Best Answer

Answers

  • Thank you for your response, John!

    I did not want to know the numbers for the purpose of pushing the platform's envelope, but rather, I wanted to be sure the cache could hold enough events for my situation. My game can have more than 1000 game pieces and a new actor entering the room needs to know the position of every piece. I can store game piece move events in the global cache or I can keep each game piece's position updated in the custom room properties. I needed to be sure the global cache could hold at least 1000 events (I will need to overwrite older game piece moves in the cache with new moves to avoid accumulating too many move events), or else I need to know that custom room properties can be large enough to hold the positions of 1000 game pieces. I needed to know this up front to avoid the possibility of wasting time implementing a solution that would be unworkable due to PhotonEngine platform restrictions.

    Thanks to your answers, I now know PE platform restrictions do not appear to be an issue for my scenario, regardless of whether I choose the global event cache or custom room properties to record game piece positions (if you have any insights as to which is preferred then I would be happy to know). I will work to implement an efficient solution in any case.

    Sorry I was not clear in my second question... I was asking if there is a byte size limit on the total event cache size. However, my events will be pretty small, so it seems unlikely I will run into any issues with limits on the cache's total byte size.
  • JohnTube
    JohnTube ✭✭✭✭✭
    About events cache size you should be safe also yes.