j2cache.properties 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. #J2Cache configuration
  2. #########################################
  3. # Cache Broadcast Method
  4. # values:
  5. # jgroups -> use jgroups's multicast
  6. # redis -> use redis publish/subscribe mechanism
  7. # none -> don't notify the other nodes in cluster
  8. # xx.xxxx.xxxx.Xxxxx your own cache broadcast policy classname that implement net.oschina.j2cache.ClusterPolicy
  9. #########################################
  10. j2cache.broadcast=redis
  11. #�鲥��ͨ������
  12. jgroups.channel.name=j2cache
  13. jgroups.configXml=/network.xml
  14. #########################################
  15. # Level 1&2 provider
  16. # values:
  17. # none -> disable this level cache
  18. # ehcache -> use ehcache2 as level 1 cache
  19. # ehcache3 -> use ehcache3 as level 1 cache
  20. # caffeine -> use caffeine as level 1 cache(only in memory)
  21. # redis -> use redis(hashs) as level 2 cache
  22. # readonly-redis -> use redis as level 2 cache ,but never write data to it. if use this provider, you must uncomment `j2cache.L2.config_section` to make the redis configurations available.
  23. # [classname] -> use custom provider
  24. #########################################
  25. j2cache.L1.provider_class=caffeine
  26. j2cache.L2.provider_class=redis
  27. # When L2 provider isn't `redis`, using `L2.config_section = redis` to read redis configurations
  28. # j2cache.L2.config_section = redis
  29. # Enable/Disable ttl in redis cache data (if disabled, the object in redis will never expire)
  30. j2cache.sync_ttl_to_redis=true
  31. # Whether to cache null objects by default
  32. j2cache.default_cache_null_object=true
  33. #########################################
  34. # Cache Serialization Provider
  35. # values:
  36. # fst -> fast-serialization
  37. # kyro -> kyro
  38. # java -> java standard
  39. # [classname implements Serializer]
  40. #########################################
  41. j2cache.serialization=fst
  42. #########################################
  43. # Ehcache configuration
  44. #########################################
  45. ehcache.configXml=/ehcache.xml
  46. #########################################
  47. # Caffeine configuration
  48. # caffeine.region.[name] = size, xxxx[s|m|h|d]
  49. #
  50. #########################################
  51. caffeine.properties=/caffeine.properties
  52. #########################################
  53. # Redis connection configuration
  54. #########################################
  55. #########################################
  56. # Redis Cluster Mode
  57. #
  58. # single -> single redis server
  59. # sentinel -> master-slaves servers
  60. # cluster -> cluster servers (���ݿ�������Ч��ʹ�� database = 0��
  61. # sharded -> sharded servers (���롢���ݿ������ hosts ��ָ���������ӳ�������Ч ; redis://user:password@127.0.0.1:6379/0��
  62. #
  63. #########################################
  64. redis.mode=single
  65. #redis storage mode (generic|hash)
  66. redis.storage=generic
  67. ## redis pub/sub channel name
  68. redis.channel=j2cache
  69. ## redis pub/sub server (using redis.hosts when empty)
  70. redis.channel.host=
  71. #cluster name just for sharded
  72. redis.cluster_name=j2cache
  73. ## redis cache namespace optional, default[j2cache]
  74. redis.namespace=
  75. ## connection ��Ⱥ�������hosts��Ӣ�Ķ��Ÿ������� 127.0.0.1:6379,127.0.0.1:6378
  76. redis.hosts=127.0.0.1:6379
  77. redis.timeout=2000
  78. ## ��Ⱥÿ���ڵ�������뱣��һ��
  79. redis.password=
  80. redis.database=0
  81. ## redis pool properties
  82. redis.maxTotal=100
  83. redis.maxIdle=10
  84. redis.maxWaitMillis=5000
  85. redis.minEvictableIdleTimeMillis=60000
  86. redis.minIdle=1
  87. redis.numTestsPerEvictionRun=10
  88. redis.lifo=false
  89. redis.softMinEvictableIdleTimeMillis=10
  90. redis.testOnBorrow=true
  91. redis.testOnReturn=false
  92. redis.testWhileIdle=true
  93. redis.timeBetweenEvictionRunsMillis=300000
  94. redis.blockWhenExhausted=false
  95. redis.jmxEnabled=false