Clearing out a cache collection


I am trying to clear out a cache definition from all its entries via de cache API by executing the following code:

if result:
    # Invalidate the availability cache.
    # TODO: Invalidate the affected portion only (i.e. entries
    # whose dates overlap for the same room id).
    cache = self.cache.get_cache('builtin', 'availability')
    if cache:

And I am getting this error:

2019-03-04 16:35:11,114 DEBG 'zato-server2' stdout output:
2019-03-04 16:35:11,113 - WARNING - 134:DummyThread-46 - zato.server.connection.cache:860 - Could not run `CLEAR` after_state_changed in cache `availability`, data:`{u'action': '106403', u'source_worker_id': u'', u'cache_name': u'availability'}`, e:`Traceback (most recent call last):
  File "/opt/zato/3.0/code/zato-server/src/zato/server/connection/", line 839, in after_state_changed
    key = data['key']
KeyError: u'key'

This is after successfully creating a new reservation, which requires, at the time, from such operation. At the moment of execution, the cache collection exists and has just one entry whose key is:


And whose value is:

[Bunch(accommodates=4, code=u'g9ZQMQ', dbl_beds=1, id=2, name=u'Large bedroom with two single and one double beds', nights=9, number=u'102', price=972.0, sgl_beds=2, taxes_percentage=21.0, taxes_value=205.0, total_price=1177.0)]

What am I doing wrong?

I pushed an update for it - can you check it now?

Yup! Working fine now :ok_hand: