Do current x86 architectures support non-temporal loads (from “normal” memory)?

To answer specifically the headline question: Yes, recent1 mainstream Intel CPUs support non-temporal loads on normal 2 memory – but only “indirectly” via non-temporal prefetch instructions, rather than directly using non-temporal load instructions like movntdqa. This is in contrast to non-temporal stores where you can just use the corresponding non-temporal store instructions3 directly. The basic … Read more

How to disable caching in Alamofire

You have a few options. Disabling the URLCache Completely let manager: Manager = { let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() configuration.URLCache = nil return Manager(configuration: configuration) }() Configuring the Request Cache Policy let manager: Manager = { let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() configuration.requestCachePolicy = .ReloadIgnoringLocalCacheData return Manager(configuration: configuration) }() Both approaches should do the trick for you. For … Read more

Using cache in ExoPlayer

Here is the solution for ExoPlayer 2.+ Create a custom cache data source factory public class CacheDataSourceFactory implements DataSource.Factory { private final Context context; private final DefaultDataSourceFactory defaultDatasourceFactory; private final long maxFileSize, maxCacheSize; public CacheDataSourceFactory(Context context, long maxCacheSize, long maxFileSize) { super(); this.context = context; this.maxCacheSize = maxCacheSize; this.maxFileSize = maxFileSize; String userAgent = Util.getUserAgent(context, … Read more

Maven docker cache dependencies

Usually, there’s no change in pom.xml file but just some other source code changes when you’re attempting to start docker image build. In such circumstance you can do this: FYI: FROM maven:3-jdk-8 ENV HOME=/home/usr/app RUN mkdir -p $HOME WORKDIR $HOME # 1. add pom.xml only here ADD pom.xml $HOME # 2. start downloading dependencies RUN … Read more

Tomcat 8 throwing – org.apache.catalina.webresources.Cache.getResource Unable to add the resource

I had the same issue when upgrading from Tomcat 7 to 8: a continuous large flood of log warnings about cache. 1. Short Answer Add this within the Context xml element of your $CATALINA_BASE/conf/context.xml: <!– The default value is 10240 kbytes, even when not added to context.xml. So increase it high enough, until the problem … Read more