Register a spatial cache. The spatial cache can be any thing you want to cache. The registery and retrieval of the cache is based on current scale.
(self, key, value)
| 771 | self._spatial_cache = {} |
| 772 | |
| 773 | def register_spatial_cache(self, key, value) -> None: |
| 774 | """ |
| 775 | Register a spatial cache. |
| 776 | The spatial cache can be any thing you want to cache. |
| 777 | The registery and retrieval of the cache is based on current scale. |
| 778 | """ |
| 779 | scale_key = str(self._scale) |
| 780 | if scale_key not in self._spatial_cache: |
| 781 | self._spatial_cache[scale_key] = {} |
| 782 | self._spatial_cache[scale_key][key] = value |
| 783 | |
| 784 | def get_spatial_cache(self, key=None): |
| 785 | """ |
no outgoing calls
no test coverage detected