Warning: session_start(): open(/var/lib/php/sessions/sess_8bl6e34hpk7q6rao68sfgi8ptp, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
static L> googleSearch_all(Browser browser, S query, double cacheExpirationDays default 1) {
ret googleSearch_all(new GoogleSearch(browser, simpleSpacesAndTrim(lower(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(gs.query, indentedStructure(result));
ret result;
}