if (file_exists("{$cachepath}{$username}.prints"))
    $prints = unserialize(file_get_contents("{$cachepath}{$username}.prints"));
else {
    $fp = fopen("{$cachepath}{$username}.prints",'w');
    fwrite($fp,serialize($prints));