Feature Proposals » TWiki::Func::getTopicLatestRevTime() to be instroduced

Summary

Current State: Developer: Reason: Date: Concerns By: Bug Tracking: Proposed For:
RejectedProposal HideyoImazu None 2020年01月22日 LimaRelease

Edit Form

CurrentState:
ReasonForDecision:
DateOfCommitment: Format: YYYY-MM-DD
ProposedFor:

Motivation

In VarCachePlugin, the following code is there.

# CODE_SMELL: Assume file system for topics
$filename = TWiki::Func::getDataDir() . "/$theWeb/$theTopic.txt";
my $topicTime = (stat $filename)[9] || 10000000000;

Description and Documentation

TWiki::Func::getTopicLatestRevTime() calling TWiki::Store::getTopicLatestRevTime() would make the code above as follows.

my $topicTime = TWiki::Func::getTopicLatestRevTime($theWeb, $theTopic) || 10000000000;

Examples

Impact

Implementation

-- Contributors: Hideyo Imazu - 2020年01月22日

Discussion

This is one possible way. Here is another option: Ther is already a TWiki::getRevisionInfo(). It could be enhanced to return one more item, a $revTime.

For performance in TWiki::getRevisionInfo(), if input $rev is missing, the top rev is assumed, and info taken from topic, not rcs file.

What do you think?

-- Peter Thoeny - 2020年01月22日

TWiki::Func::getRevisionInfo() returns ( $date, $user, $rev, $comment ) and $date is the value what we want here. In terms of efficiency, now I think getRevisionInfo() not taking $meta as an argument is an issue. Because of that, to return $user, getRevisionInfo() has no option but read and parse the topic data. I'm abandoning this proposal and make a new proposal TWikiFuncGetRevisionInfoTakingMeta to enhance TWiki::Func::getRevsionInfo() so that it takes $meta as an argument and makes use of $meta. Once the new proposal is accepted, I will make this rejected.

-- Hideyo Imazu - 2020年01月24日

The new TWikiFuncGetRevisionInfoTakingMeta proposal looks good.

-- Peter Thoeny - 2020年01月26日

Edit | Attach | (削除) Watch (削除ここまで) | Print version | History : r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2020年01月27日 - HideyoImazu
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

AltStyle によって変換されたページ (->オリジナル) /