Categories
Tags
apple codex comcast fail fbx gears of war 2 gentoo gitphp got root guitar hero gwu imac interview iphone iphone 3g linksys linux mantis mdb memcached mp3 new york comic con nightwatchman onenightdrunksongwritingexperiment pysoulforge red ring of death resume router school smarty soulforge tom morello towel trick windows work xbox 360 xxcache-
Recent Posts

GitPHP 0.0.8
This release does not have many major changes for end users. However, there are a number of significant changes under the hood:
Major features:
Caching
By request… GitPHP now makes use of Smarty caching to cache the output of any action – this includes all pages, blobs, diffs, searches, and even snapshots. There are new cache options in the example config, so make sure you copy them into your existing config to turn on caching and choose your desired cache lifetime.
GitPHP will attempt to automatically expire the cache appropriately. When a page is loaded for a project, it will expire any cached pages that are older than the most recent commit to the project, on any head. This ensures that users are always seeing the proper information for the project, and not seeing outdated information due to cached pages that have been hanging around too long. This check is a tiny performance hit, but is trivial compared to the gain of caching. You can turn this off if you want to skip the check, but you should beware that users could be seeing mixes of old and new data depending on what has and hasn’t been cached. You can also turn this off if commits are coming in so quickly that the cache is constantly being expired, but if you’re doing your git workflow properly (occasionally pushing groups of commits from a private to a public repository) this should not be the case.
If you ever run into cache issues, you can go to
http://yourserver.com/gitphp/index.php?a=expire
to forcefully expire everything in the cache. You will also need to do this if you change any config options. This is not linked anywhere from the interface since it’s an administrative action; you have to type it in yourself.
Unified templates
I realized that the way I was handling templates previously was hampering customizability. I had template pieces that got displayed in order… for example, the header template, then the nav template, then the paging prev/next template, then the log template, then the footer template… you get the idea. While each of those templates was customizable, I was still enforcing the order of elements – eg the nav always had to be first, before the content.
Now, each page’s template is a single file that displays everything. This allows full flexibility to customize the template any way you want – anything can now be moved anywhere on the page. (It also made implementing caching easier)
This is a very slight performance degradation compared to previous versions, because there are times where the code will have to loop twice – once to parse data, then another time to output it in the template. However, caching completely eliminates this difference (and then some).
Minor features:
Bugfixes:
Internationalization is not in this release. Technically it is done, but no one showed interest in translating into another language. Abstracted and tokenized strings, without any other languages besides English, are just an unnecessary performance hit. The code still exists in the branch i18n-manual, but I’m not going to merge the feature until there’s a reason to, meaning there’s at least one other language to offer.
As always, the release is on the GitPHP page, and bugs can be reported on Mantis.