-15

A few months ago, I discovered Java time-based map/cache with expiring keys and upvoted a few answers. I come back to it a few days ago, and after reading a comment (that seems to have been removed, sad as it had multiple upvote) which were saying like "strange this question is closed, even if it's good and first answer on google".

I searched in the question all reasons why it can be seeking for recommendations.

  1. Literally asking for a library with "Preferably in an open source library". So I removed it in my edit.

  2. Mention "asking for advice", but the full sentence is "I'm not asking for advice" which seems the opposite of the closed reason. Also, he mentions "a good reference implementation". But, as WeakReference, it's not always a book. He's asking for a good way to implement it, with reference to documentation that can be everything.

  3. Link to something else. One is from the Java documentation (so not linked with a library or book), and the other one is a solution that he tried which doesn't answer it.

As, for me, none of above are enough to say it's asking for a recommendation. Why has it been closed and always been declined for reopen?

4
  • 10
    I'm not asking for advice in that respect, but for pointers to a good reference implementation. still sounds like a off-site resource request.
    – BDL
    Commented Nov 26, 2022 at 23:31
  • Searched in what question? More than one question? Commented Nov 26, 2022 at 23:34
  • 1
    @BDL A good implementation can come from everywhere, and a reference can be made with javadoc for example. It's not necessary off topic for me. Peter: Yes, I searched in this question why it can be closed for this reason
    – Elikill58
    Commented Nov 26, 2022 at 23:34
  • " sad as it had multiple upvote" - You can't downvote comments, so it is kind of unfair to call it "upvotes". I call it tags myself. A comment can be tagged numerous times. And that in itself doesn't mean a whole lot, it just means it'll stay more visible when there are too many comments and things start to auto collapse. Don't give it more credit than it deserves.
    – Gimby
    Commented Nov 28, 2022 at 15:22

2 Answers 2

15

This question is asking for a library recommendation. I quote from its current text:

Do any of you know of a ... standard data store that...

...

I'm ... asking for ... pointers to a good reference implementation.

Each answer to the question has a library recommendation:

  1. Guava
  2. Link to author's GitHub
  3. Apache commons
  4. Link to author's site
  5. EH Cache

Questions asking for library recommendations are off-topic because they attract spam from people trying to promote their libraries. In addition, the answers tend to compete, which can lead to voting wars.

At this point it is not possible to edit the question to remove the request for a library without invalidating all the answers. You shouldn't edit it to try to get it re-opened.

Having this question closed isn't a bad thing. It still remains on the site and will continue to be a valuable resource. The only thing that can't happen is new answers.

1
  • For author link, one is for a complete example and not only one class. For library, they are big lib. IMHO, those types of answer can appear in lot of question
    – Elikill58
    Commented Nov 27, 2022 at 9:30
10

Think of it from a different angle. What domain is the question actually asking about, what question is the OP asking in that domain, and what answer is available that would be narrow enough to satisfy an answer for the OP?

The domain here is undeniably cache eviction. Are you familiar with the old adage surrounding cache eviction?

Basically, the trick to this problem is that there are a multitude of ways to solve this problem, and the OP doesn't do any job to narrow down what their criteria needs to be besides it being time-based.

So, what does that mean? Are we clearing entries out every X minutes? What are those entries, Strings or whole objects? Do we need to do anything with Weak References? Are we needing to store anything to disk? Do we even have a disk to store things to? You might not, y'know.

So...basically there's so many different things just based on "time-based eviction of a cache" that makes it fundamentally impossible to answer in the specific. That is to say, there is no one right answer to this question, or more pointedly, every answer is equally valid, which is exactly what makes it off-topic.

If this were asking about a specific time-based caching implementation, then sure, it'd be more on-topic. But it isn't, so having it closed is probably best in this situation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .