3333import org .commonjava .indy .service .httprox .handler .ProxyCreationResult ;
3434import org .commonjava .indy .service .httprox .handler .ProxyRepositoryCreator ;
3535import org .commonjava .indy .service .httprox .model .TrackingKey ;
36- import org . infinispan .Cache ;
36+ import com . github . benmanes . caffeine . cache .Cache ;
3737import org .slf4j .Logger ;
3838import org .slf4j .LoggerFactory ;
3939
@@ -151,9 +151,9 @@ private ArtifactStore doGetArtifactStore(String trackingId, final URL url )
151151
152152 if ( trackingId != null )
153153 {
154- if ( cache .get ( groupName ) != null )
154+ if ( cache .getIfPresent ( groupName ) != null )
155155 {
156- return (ArtifactStore ) cache .get ( groupName );
156+ return (ArtifactStore ) cache .getIfPresent ( groupName );
157157 }
158158
159159 Group group = null ;
@@ -165,7 +165,7 @@ private ArtifactStore doGetArtifactStore(String trackingId, final URL url )
165165 if ( response != null && response .getStatus () == HttpStatus .SC_OK )
166166 {
167167 group = (Group )response .readEntity (ArtifactStore .class );
168- cache .put (groupName , group , 15 , TimeUnit . MINUTES );
168+ cache .put (groupName , group );
169169 }
170170 }
171171 catch ( WebApplicationException e )
@@ -176,7 +176,7 @@ private ArtifactStore doGetArtifactStore(String trackingId, final URL url )
176176 url , trackingId );
177177 ProxyCreationResult result = createRepo ( trackingId , url , null );
178178 group = result .getGroup ();
179- cache .put (groupName , group , 15 , TimeUnit . MINUTES );
179+ cache .put (groupName , group );
180180 return group ;
181181 }
182182 else
0 commit comments