Tags:
create new tag
view all tags

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

TopicSummary:
CurrentState:
CommittedDeveloper:
ReasonForDecision:
DateOfCommitment:   Format: YYYY-MM-DD
ConcernRaisedBy:
BugTracking:
OutstandingIssues:
RelatedTopics:
InterestedParties:
ProposedFor:
TWikiContributors:
 

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
 
  • Learn about TWiki  
  • Download TWiki
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.