diff --git a/app/Services/StatusService.php b/app/Services/StatusService.php new file mode 100644 index 000000000..289fcdf88 --- /dev/null +++ b/app/Services/StatusService.php @@ -0,0 +1,46 @@ +setSerializer(new ArraySerializer()); + $resource = new Fractal\Resource\Item($status, new StatusStatelessTransformer()); + $res = $fractal->createData($resource)->toJson(); + self::set($id, $res); + return $res; + } + + public static function set($key, $val) + { + return Redis::set(self::CACHE_KEY . $key, $val); + } + + public static function del($key) + { + return Redis::del(self::CACHE_KEY . $key); + } + + public static function rem($key) + { + return self::del($key); + } +} \ No newline at end of file