Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new feature: Output class support delete cache file #609

Closed
wants to merge 2 commits into from

Conversation

appleboy
Copy link
Contributor

Hi,

I add new function of output class. We can delete cache file from application/cache directory anytime.

Example:

If you load welcome controller http://localhost/welcome/index

public function index()
{
    $this->output->cache(60);
    $this->load->view('welcome_message');
}

If the file doesn't expired, we can use the following way to delete it according to URL you load.

public function delete()
{
    $this->output->delete_cache('/welcome/index');
}

@ckdarby
Copy link
Contributor

ckdarby commented Oct 15, 2012

Having a hard time trying to come up with the case where I want to specifically delete my cache before the set time & doing it via the code.

I'd also like to point out that this is way out of date, the spacing is odd & this can be accomplished with MY_Output

@ckdarby
Copy link
Contributor

ckdarby commented Oct 15, 2012

@narfbg Do you think this functionality should be added?

@narfbg
Copy link
Contributor

narfbg commented Oct 15, 2012

IDK, +0. Deffinately outdated though and I'm wondering why is there a need of both delete_cache() and _delete_cache() methods.

@ckdarby
Copy link
Contributor

ckdarby commented Oct 15, 2012

Generally I think he wanted to make this "delete" section being able to be done via code instead of manually doing it.

I guess I could see the advantages of this if you had a migration script that updated some stuff & you wanted the cached files to be removed to reflect the new data.

narfbg added a commit that referenced this pull request Nov 30, 2012
(an improved version of PR #609)
@narfbg
Copy link
Contributor

narfbg commented Nov 30, 2012

See the above commit.

@narfbg narfbg closed this Nov 30, 2012
nonchip pushed a commit to nonchip/CodeIgniter that referenced this pull request Jun 29, 2013
(an improved version of PR bcit-ci#609)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants