<p dir="auto">I am working in Android app that load images from Amazon S3. The Image URL randomly changes with token and expiry key. For that reason i can't cache the image Glide.</p>
<p dir="auto">There is any way to set Glide cache key as any static ID(like image id) not url.</p>
<p dir="auto">I attached my code snippet to load image from AWS</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide
	.with(remoteGalleryAct)
	.load(photoFinalImageURL)
	.signature(new StringSignature(getImageUrl(photoFinalImageURL)))// remove AWS keys
	.error(defaultNoImageDrawable)
	.placeholder(defaultNoImageDrawable)
	.dontAnimate()
	.diskCacheStrategy(DiskCacheStrategy.SOURCE)
	.into(new ImageViewTarget&lt;GlideDrawable&gt;(photoHolder.photo) {
		@Override protected void setResource(GlideDrawable resource) { }
		@Override public void onResourceReady(final GlideDrawable resource, GlideAnimation&lt;? super GlideDrawable&gt; glideAnimation) {
			//super.onResourceReady(resource, glideAnimation);
			view.setImageDrawable(resource);
		}
	});"><pre class="notranslate"><span class="pl-smi">Glide</span>
	.<span class="pl-en">with</span>(<span class="pl-s1">remoteGalleryAct</span>)
	.<span class="pl-en">load</span>(<span class="pl-s1">photoFinalImageURL</span>)
	.<span class="pl-en">signature</span>(<span class="pl-k">new</span> <span class="pl-smi">StringSignature</span>(<span class="pl-en">getImageUrl</span>(<span class="pl-s1">photoFinalImageURL</span>)))<span class="pl-c">// remove AWS keys</span>
	.<span class="pl-en">error</span>(<span class="pl-s1">defaultNoImageDrawable</span>)
	.<span class="pl-en">placeholder</span>(<span class="pl-s1">defaultNoImageDrawable</span>)
	.<span class="pl-en">dontAnimate</span>()
	.<span class="pl-en">diskCacheStrategy</span>(<span class="pl-smi">DiskCacheStrategy</span>.<span class="pl-c1">SOURCE</span>)
	.<span class="pl-en">into</span>(<span class="pl-k">new</span> <span class="pl-smi">ImageViewTarget</span>&lt;<span class="pl-smi">GlideDrawable</span>&gt;(<span class="pl-s1">photoHolder</span>.<span class="pl-s1">photo</span>) {
		<span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">protected</span> <span class="pl-smi">void</span> <span class="pl-en">setResource</span>(<span class="pl-smi">GlideDrawable</span> <span class="pl-s1">resource</span>) { }
		<span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onResourceReady</span>(<span class="pl-k">final</span> <span class="pl-smi">GlideDrawable</span> <span class="pl-s1">resource</span>, <span class="pl-smi">GlideAnimation</span>&lt;? <span class="pl-en">super</span> <span class="pl-smi">GlideDrawable</span>&gt; <span class="pl-s1">glideAnimation</span>) {
			<span class="pl-c">//super.onResourceReady(resource, glideAnimation);</span>
			<span class="pl-s1">view</span>.<span class="pl-en">setImageDrawable</span>(<span class="pl-s1">resource</span>);
		}
	});</pre></div>
<p dir="auto">Please suggest me there is any way to achieve in Glide.</p>
<p dir="auto">Hi, folks.<br>
I need to cache images with dynamic url. I have 2 methods .getImageId() and .getImageUrl();<br>
I need to cache my downloaded images with getImageId() key, because this id is unique and image url change all time.<br>
How to set custom image id to cache? Please show me a way. Thanks.</p>