MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / update_cache

Method update_cache

botasaurus_server/botasaurus_server/server.py:124–136  ·  view source on GitHub ↗
(self, scraper_name)

Source from the content-addressed store, hash-verified

122 return self.controls_cache[scraper_name]["controls"]
123
124 def update_cache(self, scraper_name):
125 scraper = self.get_scraper(scraper_name)
126 input_js = scraper["input_js"]
127
128 # Check if controls need to be recreated (i.e., if input_js has changed or if controls are not yet cached)
129 if (
130 scraper_name not in self.controls_cache
131 or self.controls_cache[scraper_name]["input_js"] != input_js
132 ):
133 self.controls_cache[scraper_name] = {
134 "input_js": input_js,
135 "controls": self.create_controls(input_js),
136 }
137
138 def add_scraper(
139 self,

Callers 1

get_controlsMethod · 0.95

Calls 2

get_scraperMethod · 0.95
create_controlsMethod · 0.95

Tested by

no test coverage detected