Code Monkey home page Code Monkey logo

Comments (4)

pocketWashburn avatar pocketWashburn commented on July 19, 2024

More specifically, the updater says its updating the month archive but doesn't actually. A wipe of the cache and a full rebuild has fixed it every time for me. The first potential culprit is, I think, engine/update.sh I just haven't had a chance to dig into it yet.

from secondcrack.

pocketWashburn avatar pocketWashburn commented on July 19, 2024

ok, so update.sh is a wrapper for calling update.php, update.php wraps a call to Updater::update(), since its not useful to post the entirety of the architecture I'll stop there.

I'm looking at Updater::post_filenames_in_year_month and how its different from Updater::most_recent_post_filenames because the issue seems to be (at least in my specific test case) that the most recent post isn't making it into the posts array thats passed to the Post::write_index for the archives, when it does for the frontpage.

from secondcrack.

pocketWashburn avatar pocketWashburn commented on July 19, 2024

the difference is post_filenames_in_year_month calls posts_in_year_month which reads from cache/posts-[year]-[month]-[md5 of require_tag . " " . require_type]

and most_recent_post_filenames reads from cache/dir-[md5 of source_path . /posts]

for some reason the post doesn't make its way into the posts in year month cache, although it does in the dir- cache, so thats the next place I'll look into, how/when those caches are created.

from secondcrack.

pocketWashburn avatar pocketWashburn commented on July 19, 2024

Its entirely possible that I'm missing something, but it seems like once the cache file is created for the month archive it never gets updated unless its manually deleted because of the following lines:

engine/Updater.php 48 - 50

if (file_exists($cache_fname)) {
        $files = unserialize(file_get_contents($cache_fname));
    }

since the $cache_fname value is set to:

$cache_fname = self::$cache_path . "/posts-$year-$month-" . md5($require_tag . ' ' . $require_type);

and that filename won't change for the month's archive, it will only reach the else statement and update the archive cache file when it has been deleted.

By eliminating that if statement, it correctly updates the archive for me, but I feel like I'm missing something.

from secondcrack.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.