static L> googleSearch_all(Browser browser, S query, double cacheExpirationDays default 1) { ret googleSearch_all(new GoogleSearch(browser, simpleSpacesAndTrim(lower(gs.query))), cacheExpirationDays); } static L> googleSearch_all(GoogleSearch gs, double cacheExpirationDays default 1) { FileBasedStringMap cache = new(javaxCachesDir("Google Searches")); File f = cache.fileForKey(gs.query); if (exists(f) && fileAgeInDays(f) < cacheExpirationDays) ret (L) unstructure(cache.get(query)); // not in cache, start browser var result = gs.search_uncached(); cache.put(query, indentedStructure(result)); ret result; }