二、File缓存调用方法：

1、设置缓存

    <?php
    include('FileCache.php');
    //设置缓存
    FileCache::getInstance()->set("userid",123456);

2、查询缓存是否存在

    <?php
    include('FileCache.php');
    $cache=FileCache::getInstance();
    if($cache->has("userid")){
      echo "存在名为userid的缓存";
    }else{
      echo "不存在名为userid的缓存";
    }

3、获取缓存

    <?php
    include('FileCache.php');
    //读取缓存
    $userid=FileCache::getInstance()->get("userid");
    echo $userid;

4、删除某个缓存

    <?php
    include('FileCache.php');
    //删除缓存
    FileCache::getInstance()->delete("userid");

5、清空全部缓存

    <?php
    include('FileCache.php');
    //清空全部缓存
    FileCache::getInstance()->clear();
