<commit_before>/*
 * $Log: ICacheAdapter.java,v $
 * Revision 1.1  2010-09-13 13:28:19  L190409
 * added cache facility
 *
 */
package nl.nn.adapterframework.cache;

import java.io.Serializable;

import nl.nn.adapterframework.configuration.ConfigurationException;

/**
 * Interface to be implemented by cache-providers. 
 * 
 * @author  <NAME>
 * @since   4.11
 * @version Id
 */
public interface ICacheAdapter {

	void configure(String ownerName) throws ConfigurationException; 
	void open();
	void close();

	/**
	 * Transform the input of the current element to a key in the cache-map.
	 * Allows for instance XPath translations.
	 */
	String transformKey(String input);
	

	/**
	 * Obtain a potentially cached value, set by putString().
	 */<commit_msg>added transformValue()<commit_after>/*
 * $Log: ICacheAdapter.java,v $
 * Revision 1.2  2011-05-31 15:29:44  L190409
 * added transformValue()
 *
 * Revision 1.1  2010/09/13 13:28:19  <NAME> <<EMAIL>>
 * added cache facility
 *
 */
package nl.nn.adapterframework.cache;

import java.io.Serializable;
import java.util.Map;

import nl.nn.adapterframework.configuration.ConfigurationException;

/**
 * Interface to be implemented by cache-providers. 
 * 
 * @author  <NAME>
 * @since   4.11
 * @version Id
 */
public interface ICacheAdapter {

	void configure(String ownerName) throws ConfigurationException; 
	void open();
	void close();

	/**
	 * Transform the the current request message to a key in the cache-map.
	 * Allows for instance XPath translations.
	 */
	String transformKey(String input, Map sessionContext);
	
	/**
	 * Transform the the current response message to a value in the cache-map.
	 * Allows for instance XPath translations.
	 */
	String transformValue(String input, Map sessionContext);
	

	/**
	 * Obtain a potentially cached value, set by putString().
	 */
{'fraction_non_alphanumeric': 0.11099020674646355, 'fraction_numerical': 0.035908596300326445, 'mean_word_length': 3.7275064267352187, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3869194', 'n_tokens_mistral': 613, 'n_tokens_neox': 541, 'n_words': 174}