Skip to content

Commit

Permalink
Change default HTTP client cache settings
Browse files Browse the repository at this point in the history
  • Loading branch information
guusdk committed Jun 28, 2024
1 parent 48d8666 commit d090870
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/org/jivesoftware/webservices/RestClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ public class RestClient {

private static final Logger Log = LoggerFactory.getLogger( RestClient.class );

private static final CacheConfig cacheConfig = CacheConfig.DEFAULT;
private static final CacheConfig cacheConfig = CacheConfig.custom()
.setMaxObjectSize(250_000L) // The RSS feeds' JSON is easily 100k.
.setMaxCacheEntries(250) // prevent the default amount of 1000 entries to be cached, when they _can_ be 250k each.
.build();

public JSONObject get(String url) {
JSONObject result = null;
Expand Down

0 comments on commit d090870

Please sign in to comment.