Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
70ca0102
Commit
70ca0102
authored
9 years ago
by
Lukas Reschke
Browse files
Options
Downloads
Patches
Plain Diff
Fix PHPDoc annotations
parent
123807bf
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/private/cache/file.php
+24
-0
24 additions, 0 deletions
lib/private/cache/file.php
with
24 additions
and
0 deletions
lib/private/cache/file.php
+
24
−
0
View file @
70ca0102
...
...
@@ -42,6 +42,8 @@ class File {
* Returns the cache storage for the logged in user
*
* @return \OC\Files\View cache storage
* @throws \OC\ForbiddenException
* @throws \OC\User\NoUserException
*/
protected
function
getStorage
()
{
if
(
isset
(
$this
->
storage
))
{
...
...
@@ -64,6 +66,8 @@ class File {
/**
* @param string $key
* @return mixed|null
* @throws \OC\ForbiddenException
*/
public
function
get
(
$key
)
{
$result
=
null
;
...
...
@@ -91,6 +95,10 @@ class File {
/**
* @param string $key
* @param mixed $value
* @param int $ttl
* @return bool|mixed
* @throws \OC\ForbiddenException
*/
public
function
set
(
$key
,
$value
,
$ttl
=
0
)
{
$storage
=
$this
->
getStorage
();
...
...
@@ -114,6 +122,11 @@ class File {
return
$result
;
}
/**
* @param string $key
* @return bool
* @throws \OC\ForbiddenException
*/
public
function
hasKey
(
$key
)
{
$storage
=
$this
->
getStorage
();
if
(
$storage
&&
$storage
->
is_file
(
$key
)
&&
$storage
->
isReadable
(
$key
))
{
...
...
@@ -124,6 +137,8 @@ class File {
/**
* @param string $key
* @return bool|mixed
* @throws \OC\ForbiddenException
*/
public
function
remove
(
$key
)
{
$storage
=
$this
->
getStorage
();
...
...
@@ -133,6 +148,11 @@ class File {
return
$storage
->
unlink
(
$key
);
}
/**
* @param string $prefix
* @return bool
* @throws \OC\ForbiddenException
*/
public
function
clear
(
$prefix
=
''
)
{
$storage
=
$this
->
getStorage
();
if
(
$storage
and
$storage
->
is_dir
(
'/'
))
{
...
...
@@ -148,6 +168,10 @@ class File {
return
true
;
}
/**
* Runs GC
* @throws \OC\ForbiddenException
*/
public
function
gc
()
{
$storage
=
$this
->
getStorage
();
if
(
$storage
and
$storage
->
is_dir
(
'/'
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment