Very fast file caching library for CodeIgniter

I’ve written a file caching library for CodeIgniter. It’s blazing fast, can cache anything, for any length of time, and supports cache tagging which means you can delete whole groups of cache files at once. It’s completely self cleaning and also has a method that can be called in a cron job to keep the file-system tidy.

It is intended to be used alongside CodeIgniter’s own caching library.

The code is here http://bitbucket.org/alexbilbie/codeigniter-file-caching-library

Usage

Add something to the cache (returns TRUE if successful)
$this->cache->set( (string)$id, (mixed)$data, (array)$tags, (int)$lifetime );

Get something from the cache (returns FALSE if fail)
$this->cache->get( (string)$id );

Delete an item
$this->cache->delete( (string)$id );

Delete an item by tag (accepts either one tag or an array of tags)
$this->cache->delete_by_tag( (string|array)$tags );

Delete all (this will only delete cache files created by this library, not CodeIgniter’s own caches)
$this->cache->delete_all();

Cleanup (intended for use in a scheduled/cron job)
$this->cache->cleanup();

I hope people find it useful!

Student Timetables

Back in September I was quite bored one night and (as you do when you’re bored) hacked our student timetables so I could subscribe to it in Google Calendar (or iCal or Outlook or any other calendaring app that supports .ics format).

Joss Winn was quite impressed and offered to host it for my on the Learning Lab server, he even wrote a blog post which boosted my ego for about twenty minutes.

Anyhow a few weeks on I’m really pleased to say that a lot of my fellow computing students are using it and I’ve been approached by the online services team (whom Nick works for) about turning my hack into “an official hack”. Not only that but I think I’ve worked out a way of tracking changes to your calendar and you being notified by @ul_timetables on Twitter AND if you send a direct message to the account you’ll also be able to add new events to your personal calendar (such as assessments and exams).

I’ve not actually written the code yet because I’m a bit stretched for time at the moment however as soon as it’s ready I’ll announce it here and on Twitter.

Hello, World (the obligatory introduction post)

Hello, I’m Alex Bilbie. I’m a second year computer science student working towards a MComp degree.

Over the summer of 2009 I became involved with a number of project the University of Lincoln‘s Centre for Education Research and Development were undertaking such as JISCPress and Learning Landscapes. I’ve since been very interested in working towards the concept that my friend and colleague Nick Jackson calls a ‘Joined-Up Campus’ and is something that Joss Winn, Paul Stainthorp and a number of other University figures are passionate about.

I’m a big PHP fan and I’m currently toying with either learning Python or Ruby or putting the web to one side and playing with Objective-C so I can create that $$$ iPhone app. Hmm we’ll see.

I’m not sure what I’m going to use this blog for to be honest; I’ve tried blogging before but never committed properly to it, however I do tweet an awful lot and some times I feel like that 140 characters is not enough to get my point across so perhaps this will just become an extension to my thoughts which would I’d normally post elsewhere.