@Override
	public CacheRequest put(URI uri, URLConnection conn) throws IOException
	{
		// only cache http(s) GET requests
		if (!(conn instanceof HttpURLConnection) || !(((HttpURLConnection) conn).getRequestMethod().equals("GET")))
		{
			return null;
		}

		File localFile = getLocalFile(uri);
		
		if (localFile == null)
		{
			// we don't want to cache this URL 
			return null;
		}
		
		new File(localFile.getParent()).mkdirs();
		return new LocalCacheRequest(localFile);
	}