MCPcopy Index your code
hub / github.com/secdev/scapy / clear_cache

Method clear_cache

scapy/packet.py:699–711  ·  view source on GitHub ↗

Clear the raw packet cache for the field and all its subfields

(self)

Source from the content-addressed store, hash-verified

697 return None
698
699 def clear_cache(self):
700 # type: () -> None
701 """Clear the raw packet cache for the field and all its subfields"""
702 self.raw_packet_cache = None
703 for fname, fval in self.fields.items():
704 fld = self.get_field(fname)
705 if fld.holds_packets:
706 if isinstance(fval, Packet):
707 fval.clear_cache()
708 elif isinstance(fval, list):
709 for fsubval in fval:
710 fsubval.clear_cache()
711 self.payload.clear_cache()
712
713 def self_build(self):
714 # type: () -> bytes

Callers 2

dns_compressFunction · 0.45
h2iMethod · 0.45

Calls 2

get_fieldMethod · 0.95
itemsMethod · 0.80

Tested by

no test coverage detected