Created
June 23, 2018 01:52
-
-
Save Malinskiy/c974c7b8c154beb018359437d51f9d92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Content get(final Context context) throws IOException { | |
Content content = maybeGetCachedContent(context); | |
Request request = context.getRequest(); | |
if (request != null && request.getHeaders() != null && request.getHeaders().get("User-Agent") != null && | |
request.getHeaders().get("User-Agent").startsWith("Nexus/")) { | |
request.getAttributes().set("DisableNegativeCache", true); | |
return null; | |
} | |
return doGet(context, content); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment