Coder Social home page Coder Social logo

ehcache-cache's People

Contributors

carldea avatar dependabot-preview[bot] avatar dependabot[bot] avatar emacarron avatar harawata avatar hazendaz avatar hboutemy avatar kazuki43zoo avatar polopi avatar renovate[bot] avatar simonetripodi avatar vlastimil-dolejs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ehcache-cache's Issues

Can load config form other place?

Can load config form other place?

How to use a existed ehcacheManager?

    <bean id="ehcacheManager"
        class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
        <property name="configLocation" value="classpath:my-ehcache.xml" />
    </bean>

mapper.xml 配置cache的时间无效

在ehcache.xml配置了默认的缓存信息,时间300s

在mapper.xml配置过期时间3s,测试结果,还是300s有效果

使用springboot 框架

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/ci.yaml
  • actions/checkout v4
  • actions/setup-java v4
.github/workflows/codeql.yml
  • actions/checkout v4
  • github/codeql-action v3
  • github/codeql-action v3
  • github/codeql-action v3
.github/workflows/coveralls.yaml
  • actions/checkout v4
  • actions/setup-java v4
.github/workflows/site.yaml
  • actions/checkout v4
  • actions/setup-java v4
  • JamesIves/github-pages-deploy-action v4.6.0
.github/workflows/sonar.yaml
  • actions/checkout v4
  • actions/setup-java v4
.github/workflows/sonatype.yaml
  • actions/checkout v4
  • actions/setup-java v4
maven
pom.xml
  • org.mybatis:mybatis-parent 43
  • org.mybatis:mybatis 3.5.16
  • net.sf.ehcache:ehcache 2.10.9.2
  • org.junit.jupiter:junit-jupiter-engine 5.10.2
  • org.slf4j:slf4j-simple 2.0.13
maven-wrapper
.mvn/wrapper/maven-wrapper.properties
  • maven 3.9.6
  • maven-wrapper 3.3.1

  • Check this box to trigger a request for Renovate to run again on this repository

put empty list to cache

MyBatis version 3.2.0
in putObject param value is ArrayList and you don't check if is it empty and write to cache, when next time call getObject it returns empty list but in database row has already
and another forks with cache the same situation
example:
SqlSession sqlSession = sqlSessionFactory.openSession();
....
try{
Types t=typesMapper.getTypeByName("cool");
if(t==null){
typesMapper.create('cool');
}
}
finally{
sqlSession .close();
}
//put to cache empty list
......
openSession();
Types t=typesMapper.getTypeByName("cool");//get from cache empty list but object was created

Trying to get attention!

@emacarron Lack of a better way to contact you! I've had an open pull request which has evolved over the last few months and follows all the others I've been doing. hazelcast-cache. Can you take a look at it?

download too slow in China

I am disheartened to see that downloading the jar is too slow in China!I can't wait for it,and I am going to mad!!! It remains the status :
download too slow

NPE when using EhBlockingCache

First I want to thank you for that library, seamless integration to ehcache.

As the documentation suggest we can use EhBlockingCache, I tried to use since I have use case where I have concurrent write to same entry.
Except it fails for every request with NPE.

Looking a the code, it seems that

this.cache

is never initialized in EhBlockingCache

maxBytesLocalDisk not observed

I'm revisiting the use of mybatis/ehcache-cache in a web application. I have setup a few MyBatis mappers to use org.mybatis.caches.ehcache.EhcacheCache and I have them configured via a central ehcache.xml file with individual cache managers () configured for each mapper.

Using a profiler and viewing MBeans for net.sf.ehcache, I can see the mappers being setup according to my configuration, what I don't see is a respect for the maxBytesLocalDisk setting I provide. In other words, as I query my website, and run the disk usage command on my file system, looking at the mybatis cache path, the disk usage seems to grow without limit.

I've tried both setting a global maxBytesLocal disk as well as a maxBytesLocalDisk at an individual cache manager level. Below is my latest setup.

Snippet from mapper.xml file:

<mapper namespace="org.cbioportal.persistence.mybatis.SampleMapper"> <cache readOnly="true" type="org.mybatis.caches.ehcache.EhcacheCache"/>
...
</mapper>

Snippet from ehcache.xml:

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="false" monitoring="autodetect" maxBytesLocalDisk="${mybatis.cache.maxBytesLocalDisk}" dynamicConfig="true" name="myapp-ehcache">

<cache name="org.cbioportal.persistence.mybatis.SampleMapper" statistics="${mybatis.cache.statistics}" maxEntriesLocalHeap="${mybatis.cache.SampleMapper.entrysize}">
<persistence strategy="localTempSwap"/>
</cache>
</ehcache>

For testing I currently have mybatis.cache.maxBytesLocalDisk set to 10M, but I'm already at 145M after a few queries:
du -sh ~/local/apache-tomcat/ehcache/org%002ecbioportal%002epersistence%002emybatis%002e%0053ample%004dapper.data
145M /Users/grossb1/local/apache-tomcat/ehcache/org%002ecbioportal%002epersistence%002emybatis%002e%0053ample%004dapper.data

This latest configuration sets a global maxBytesLocalDisk (within ehcache element), but I've tried to set them at the mapper/cache manager level (within cache element) with the same result.

Any ideas what I'm doing wrong?

Thanks for your time and attention to this matter - and thanks for the library, very useful in my application!

Question - integrating Ehcache Monitor

Is there anyway to integrate the Ehcache monitor within the mapper XML file? The only documentation I find on setting up the monitor is through a separate ehcache.xml. If thats the case, can you have an ehcache.xml file to specify the monitor settings and have cache elements defined in the mapper xml files simultaneously?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.