How to remove/replace an event in the global cache?

According to the cached events documentation it is possible to remove events from the global cache, but I have been unable to find an API that accomplishes that. The list of available event caching values shows a value for adding to the global cache, but not a corresponding value for removing or replacing an event in the global cache. How do I accomplish this?

Best Answer


  • Bob_F
    Thanks, @JohnTube, that's an interesting solution!

    I ended up solving my problem by using custom room properties to broadcast and store my events, rather than the global event cache. That allows me to simply overwrite old events with new events by using the event code as a property key. The other players are then automatically notified via onPropertiesChange. That solution would not necessarily work well for everyone, but it seems to work pretty well for my particular case and it was easy to implement. I appreciate knowing your solution though since I may have need for it as I get deeper into my project. Thanks again!