It's hardly to remove all one ports' entry at all, because if some codes query cache by filter=None, some codes use fitler={"x":y, "a": b}, especially when the code is not in Neutron.
So, it's better to remove such "server_queries" records. Because, if the resource is in cache, just return it. If it is not, get it from neutron-server.
1. Agent resource cache has a infinite growth set: _satisfied_ server_ queries /github. com/openstack/ neutron/ blob/master/ neutron/ agent/resource_ cache.py# L41
https:/
there is no entry removal for this set.
2. Because this set has a non-standard structure, for instance: 5138-49ae- bbe4-324f409665 6d',))) , ('Network', ('id', ('e04208de- 1006-4a6b- 881a-83129856af a6',))) , ('Network', ('id', ('505155ea- 8fbb-42d1- a8c9-cc2c78f847 6e',))) , ('Port', ('id', (u'ac825cc9- 906a-45db- a77d-4e336fc1c4 ea',))) , ('Port', ('id', (u'c3a72a39- dbd5-4737- a68c-120de93b18 6c',))) , ('Network', ('id', ('cd5155df- 9777-4487- a730-b5ee533c4f 80',))) , ('Port', ('id', (u'340e02f2- fe54-4f31- 8858-7f6413fb00 10',))) , ('Port', ('id', (u'64fc4d85- 04d6-453f- 8d20-f4d1308d34 fd',))) , ('Network', ('id', ('a6201723- a237-433c- b357-82a6a24526 e5',))) , ('Network', ('id', ('71a80697- 1705-4bd0- b65b-0fd7dd6168 36',))) , ('Port', ('security_ group_ids' , ('48a2ebb8- 16ea-4a0a- 9d45-eabc6a6b3d cf',))) , ('Network', ('id', ('7e83c48a- b246-4a02- bb87-10016ac4b4 7e',))) , ('SecurityGroup Rule', ('security_ group_id' , (u'48a2ebb8- 16ea-4a0a- 9d45-eabc6a6b3d cf',))) , ('Port', ('id', (u'2cc656ba- b07b-4e85- ad56-ee6da4b2e7 63',))) , ('Port', ('id', (u'89d0aab8- 82f7-4e5e- 98b1-e009e31498 ce',))) , ('Port', ('id', (u'd820dbc2- bf4f-463b- 9a67-6b704202be e0',))) , ('Network', ('id', ('aea5771b- 9655-4936- b9f4-f94d482c0b 15',))) , ('Port', ('id', (u'68c3e31b- 9bf6-45e9- bfbb-3da1cafebc ec',))) ])
set([('Port', ('id', (u'830d035e-
It's hardly to remove all one ports' entry at all, because if some codes query cache by filter=None, some codes use fitler={"x":y, "a": b}, especially when the code is not in Neutron.
3. If the port removed, and added again, because the query is in the _satisfied_ server_ queries: https:/ /github. com/openstack/ neutron/ blob/master/ neutron/ agent/resource_ cache.py# L75
It may return None or stale resource.
So, it's better to remove such "server_queries" records. Because, if the resource is in cache, just return it. If it is not, get it from neutron-server.