You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Nikita Timofeev (JIRA)" <ji...@apache.org> on 2017/02/15 15:22:04 UTC

[jira] [Commented] (CAY-2233) Deprecate (or even delete) size() and clear() methods from QueryCache interface

    [ https://issues.apache.org/jira/browse/CAY-2233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15868014#comment-15868014 ] 

Nikita Timofeev commented on CAY-2233:
--------------------------------------

Additional note for clear() method. It is used by {{RefreshQuery}} (see usage of its method {{isRefreshAll()}})

> Deprecate (or even delete) size() and clear() methods from QueryCache interface
> -------------------------------------------------------------------------------
>
>                 Key: CAY-2233
>                 URL: https://issues.apache.org/jira/browse/CAY-2233
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Core Library
>            Reporter: Nikita Timofeev
>            Assignee: Nikita Timofeev
>             Fix For: 4.0.M5
>
>
> # clear() method can be really dangerous to call when some shared external cache is used as it can drop the whole cache content not only the one managed by Cayenne.  And we shouldn't interfere with external environment.
> # size() method on the other side is _safe_, but it is already unsupported by JCache provider and it can give not useful results for other providers too, and moreover cache management shouldn't be done by Cayenne as it is implementation and usage dependent
> So the only question is wether to delete this methods or just deprecate them in 4.0



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)