Skip to content

Optimize cache structure #2721

@zz-zhi54

Description

@zz-zhi54

Question?

When I read the source code of mybatis recently,Discover the occurrence attribute of mapper ->cache And type,
Cache is used . However, evaluation is an elimination strategy. A cache is required in the construction method,
such as

public FifoCache(Cache delegate)

My idea is to add a layer of baseCache to the middle of the cache.
eviction:
Add a method to verify the existence of the cache and a method to set the cache when creating the cache of the evaluation Or use the construction method

Then it is divided into real cache and occurrence cache.
I don't know whether this direction is feasible. If so, I would be happy to submit pull requests

MyBatis version

3.x.x

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions