View Javadoc
1   /*
2    * Licensed under the Apache License, Version 2.0 (the "License"); you may not
3    * use this file except in compliance with the License. You may obtain a copy of
4    * the License at
5    * 
6    * http://www.apache.org/licenses/LICENSE-2.0
7    * 
8    * Unless required by applicable law or agreed to in writing, software
9    * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
10   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11   * License for the specific language governing permissions and limitations under
12   * the License.
13   */
14  
15  package org.esigate.cache;
16  
17  import java.util.Properties;
18  
19  import org.apache.http.impl.client.cache.CacheConfig;
20  import org.apache.http.impl.client.cache.ManagedHttpCacheStorage;
21  
22  public class ManagedCacheStorage extends CacheStorage {
23  
24      @Override
25      public void init(Properties properties) {
26          CacheConfig cacheConfig = CacheConfigHelper.createCacheConfig(properties);
27          setImpl(new ManagedHttpCacheStorage(cacheConfig));
28      }
29  
30  }