Package: chronicle Version: 4.6-2 Severity: normal Tags: patch -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
I think there is a logical problem in the cache handling which makes it a bit useless in connection with comments. If I'm reading readBlogEntry() correctly, it * first tries to read from the cache and returns if it finds the entry * otherwise writes the entry to the cache, unless the entry has comments and it's "new" enough. So for a new posting what happens is: - - it's not found in the cache - - it gets written to the cache since obviously (!) it has no comments yet - - later a comment might be written - - but this will never appear after a rebuild since from now on the cached version is returned Something like the attached patch seems to improve the situation; the idea is simply that entries are never cached if they are "new", independent of the fact if they have comments or not. Cheers, gregor -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBCAAGBQJQ2cgLAAoJELs6aAGGSaoGPDMP/0xyhF9jnYsW4N5h5QQK8rjW KqJFlcu6t0atcFJ81PvlDpjTQJmZa0Gp3xPcvPIWd2shkLCoLH2UjiOIxnKjtjFg Jhy1M3OW9AyJxw0Q3sJ2TO9nJM71VNub3CZGDo8hDP6WQAMB5pBwjUjIAcmUHc2+ pV185YI7GOYtkdbQx9KUIkb52yOSKAbB0hgJ7v8JWTwbJmPiszhjIUfegVtWs6He viGvSL6uH1BuR8Y6q3feah1yeQNQ6LJXs3vmVsEl7JymW6MRYvrFrrthUHLa2Q3v Aw9lnvEH0YB+Kb3WxxE1jOR/oYRgOCRVCgira0xU7VcZhlpXh2qjoW5Ym9Goka0W sTG3nm25JRi+4g7J20M98V07i4sQuaR2LVfwS0+mQRKQ9EHztAmOYDgnNpGd0P+J wcfVvr0Qn8psaKg5mw38mzIkVKfGy4peXSZYWAs06ZVHvQsQU4wkTjEgoxxhtycX KFyWyQDasn4MTT0gZqLJ+iO/eulUg9b23yvmJrLdozSIOTBJnzoW1QmguzAd9hyJ I3froWldvPKM8ljSjE2k19zdtucWhSxhEedaYIV9yRtuemSVM5UTQ5BBzdhHytMu zkZ2qWKfqzNaKueoiPa4Vpx6ql3GKuaOthe8f2QkDk2WQdsQB4ksIXoA1CG+1g1F 2xrkqR3ZJ6LxeMGaEd2s =QUdR -----END PGP SIGNATURE-----
--- unpacked/usr/bin/chronicle 2011-05-15 20:15:12.000000000 +0200 +++ /usr/bin/chronicle 2012-12-25 16:12:36.000000000 +0100 @@ -2527,27 +2529,21 @@ { my $update = 1; + # + # The number of seconds past the epoch of today and the + # date the blog is supposed to be published is used. + # + my $time = str2time( $entry{ 'date' } ); + my $today = time; - if ( ( $entry{ 'comment_count' } ) && - ( $entry{ 'comment_count' } ) > 0 ) - { - - # - # The number of seconds past the epoch of today and the - # date the blog is supposed to be published is used. - # - my $time = str2time( $entry{ 'date' } ); - my $today = time; - - # - # The number of days that should be allowd. - # - my $days = $CONFIG{ 'comment-days' } * 60 * 60 * 24; + # + # The number of days that should be allowd. + # + my $days = $CONFIG{ 'comment-days' } * 60 * 60 * 24; - if ( ( $time + $days ) > $today ) - { - $update = 0; - } + if ( ( $time + $days ) > $today ) + { + $update = 0; } # @@ -2555,7 +2551,6 @@ # # We don't store in the cache if: # - # * The entry has comments. # * The entry is "recent", as set by "--comment-days". # #