My (late) 2010 New Years Resolutions

After a lot of thinking I think I’ve decided on the three things that I want  to focus on this year.

1) Un-complicate my life

Since last summer I’ve been involved with a number of projects, both within the University and outside it. As a result I’ve been very busy, to a certain extent been quite stressed and without a formal work office I’ve found it difficult to “let go”. I really feel that I need to make some changes to basically calm down. I’ve decided that I’m going to take a lot less on, especially now I’m working for Online Services I’ve got an office and a desk and I can leave my work there and forget about it at home. I still want to continue with my work with Joss on JISCPress and I’ve agreed to work with a number of departments on their websites however I really feel that is enough. I also may put to bed a number of my personal projects and perhaps focus on learning Python and continuing with my random API mashups (I’ve got a new one coming soon that makes use of the new Spotify API).

As a result of slowing down my working life I want to increase my social activities a bit more and enjoy being a student.

2) Put a bit more effort into my education

I’ll admit that as a result of much of what I’ve discussed above I’ve kind of put my education second, not intentionally, but more just because my other work excites me more. So hopefully with less on I can better focus my attention on my upcoming exams and final assignments.

3) Exercise more

Cliche? Maybe. Even so, an advantage of working for the University is that I get free gym membership and I full intend to make use of it.

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!