[codegen] Cachesize config seconds (#5816)

* make name cache configurable

* Address review comments
This commit is contained in:
Sebastien Rosset 2020-04-03 14:15:55 -07:00 committed by GitHub
parent 3d99c58338
commit acae76b38f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,13 +18,13 @@ import java.util.regex.Pattern;
public class StringUtils {
/**
* Modify the cache size of the sanitizedNameCache, camelizedWordsCache and underscoreWords.
* Set the cache size (entry count) of the sanitizedNameCache, camelizedWordsCache and underscoreWords.
*/
public static final String NAME_CACHE_SIZE_PROPERTY = "org.openapitools.codegen.utils.namecache.cachesize";
/**
* Modify the cache expiry of the sanitizedNameCache, camelizedWordsCache and underscoreWords.
* Set the cache expiry (in seconds) of the sanitizedNameCache, camelizedWordsCache and underscoreWords.
*/
public static final String NAME_CACHE_EXPIRY_PROPERTY = "org.openapitools.codegen.utils.namecache.expireafter";
public static final String NAME_CACHE_EXPIRY_PROPERTY = "org.openapitools.codegen.utils.namecache.expireafter.seconds";
// A cache of camelized words. The camelize() method is invoked many times with the same
// arguments, this cache is used to optimized performance.