RemoveFromRoomCache not working as expected

Hi,

I am sending several messages via Photon, with caching. Caching itself works fine. Every message sent has the same event code and a different byte array as content.

Unfortunately, I can't make cache cleaning to work. I must remove previously sent messages one by one. Docs say event code and content are used as filter when RemoveFromRoomCache is used. So I used the below code:
return PhotonNetwork.RaiseEvent(
                eventCode: 2,
                eventContent: buffer,
                sendReliable: true,
                options: new RaiseEventOptions
                {
                    CachingOption = EventCaching.RemoveFromRoomCache
                });
However, with a single call it removes all cached messages, not only the one with matching content. In fact, when I replace `buffer` with an empty byte array (new byte[0]), it still removes all cached events. Does it only work with Photon Hashtable?

What am I doing wrong and what is the right approach to removing cached events one by one?

Best Answer

Answers

  • Thanks, it indeed got to work with Hashtable, but frankly docs are lacking here. Thanks for help.
  • pbalaga wrote: »
    Thanks, it indeed got to work with Hashtable, but frankly docs are lacking here. Thanks for help.

    Hello there I cached event successfully. But if a player gets reconnected old events are fired again. How to remove those old events which are executed properly during proper internet connection.
    I don't want him to receive the old events which are already executed
  • JohnTube
    JohnTube ✭✭✭✭✭