Home Backend Development PHP Tutorial Yii清理缓存的方法_php实例

Yii清理缓存的方法_php实例

Jun 07, 2016 pm 05:09 PM
yii clear cache

本文实例讲述了Yii清理缓存的方法。分享给大家供大家参考,具体如下:

html:

复制代码 代码如下:

js:

function clearCache()
{
  $.get('../eng/index.php?r=site/clear&'+new Date().getTime(),function(){
    alert('Clear eng cache ok.');
  });
}

Copy after login

php:

public function actionClear()
{
  Yii::app()->cache->flush();
}

Copy after login

希望本文所述对大家基于Yii框架的PHP程序设计有所帮助。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to deal with slow network speed on Apple mobile phones How to deal with slow network speed on Apple mobile phones Feb 18, 2024 pm 07:27 PM

What to do if the Internet speed of your Apple mobile phone is slow. Today, Apple mobile phones have become an indispensable part of people's lives. However, sometimes we may encounter the problem of slow network speed on Apple mobile phones, which is very unpleasant. So what should I do if my iPhone’s Internet speed is slow? Here are some solutions. Check the network signal First, we need to ensure that the network signal of the mobile phone is normal. You can try switching to another location, or use another mobile phone to conduct a comparative test to determine whether it is a network signal problem. Close unnecessary apps sometimes on iPhone

How to clear the cache of Tencent Mobile Game Assistant - How to clear the cache of Tencent Mobile Game Assistant How to clear the cache of Tencent Mobile Game Assistant - How to clear the cache of Tencent Mobile Game Assistant Mar 04, 2024 pm 03:00 PM

Many gamers are using Tencent Mobile Game Assistant, but do you know how to clear the cache of Tencent Mobile Game Assistant? Below, the editor will bring you the method of clearing the cache of Tencent Mobile Game Assistant. Interested users can take a look below. Bar. 1. Open Tencent Mobile Game Assistant, and then click "My Games" on the left; 2. Open the game you want to clear cache; 3. Then click the three-bar button in the upper right corner of the game window; 4. Then select "Clear Cache" "; 5. Then a prompt box will pop up, we can click "OK"; 6. After the cleaning is completed, we can click "OK"

Where to clear the cache of Tomato Novels_Introduction to how to clear the cache of Tomato Novels Where to clear the cache of Tomato Novels_Introduction to how to clear the cache of Tomato Novels Mar 21, 2024 pm 05:22 PM

Tomato Novel is an e-book reading app. When we read novels in it, it will inevitably generate some junk data. If you are afraid of taking up resources, you can clean the cache. Let’s take a look at the specific operation method with the editor! Introduction to how to clear the cache of Tomato Novel 1. First open the Tomato Novel software, enter the homepage and click [My] in the lower right corner; 2. Then go to the My page and click [Settings Icon] in the upper right corner; 3. Then when you come to the settings page, you can see a [Clear Cache] function and click it; 4. After the final click, a dialog box will pop up on the page, click [OK] here;

How to clear the cache of Baidu Netdisk How to clear the cache How to clear the cache of Baidu Netdisk How to clear the cache Mar 27, 2024 pm 01:26 PM

Baidu Netdisk mobile client is a must-have storage software for countless mobile phone users. The storage space of this software is very large. As long as you want to see and save, you can upload it here. There is no need to pay to activate VIP, in any format. The file upload and transmission speed is very fast and worth using. No need to worry about running out of memory on your phone. All kinds of information can be seen clearly, and links can be generated online to share. You need to extract a code to open it. Experience the efficient transmission method. Now the editor will push it online in detail to Baidu Netdisk partners. How to clear cache. Click Settings. Open the Baidu Netdisk app and click Settings on the My interface to enter. Click * After entering the interface, find * Settings and click. Click to clear

How to use PHP framework Yii to develop a highly available cloud backup system How to use PHP framework Yii to develop a highly available cloud backup system Jun 27, 2023 am 09:04 AM

With the continuous development of cloud computing technology, data backup has become something that every enterprise must do. In this context, it is particularly important to develop a highly available cloud backup system. The PHP framework Yii is a powerful framework that can help developers quickly build high-performance web applications. The following will introduce how to use the Yii framework to develop a highly available cloud backup system. Designing the database model In the Yii framework, the database model is a very important part. Because the data backup system requires a lot of tables and relationships

How to clear the cache of iPhone system data 'Understand in seconds: How to correctly clear the cache of iPhone' How to clear the cache of iPhone system data 'Understand in seconds: How to correctly clear the cache of iPhone' Feb 06, 2024 pm 10:19 PM

Many people think that the iPhone will never freeze. In fact, after long-term use, a lot of cache will be generated, which will also cause the phone to freeze. Today, I will teach you how to correctly clear the cache of the iPhone. After cleaning, the speed will be several times smoother. 01. Press and hold the home button. First, press and hold the lock screen button for 5 seconds to enter the sliding shutdown interface. Then press and hold the home button until the password input interface appears. After letting go, the cleaning is completed. Enter the password to view the memory. If your iPhone does not have a home button, you can use the little white dot to assist you. Click [Settings]-[General]-[Shutdown], then open the little white dot, and long press the [Home Screen] button to complete the cleanup. 02. Uninstall the APP correctly and open [Settings]-[General]-[iPhone Storage Space], here

Symfony vs Yii2: Which framework is better for developing large-scale web applications? Symfony vs Yii2: Which framework is better for developing large-scale web applications? Jun 19, 2023 am 10:57 AM

As the demand for web applications continues to grow, developers have more and more choices in choosing development frameworks. Symfony and Yii2 are two popular PHP frameworks. They both have powerful functions and performance, but when faced with the need to develop large-scale web applications, which framework is more suitable? Next we will conduct a comparative analysis of Symphony and Yii2 to help you make a better choice. Basic Overview Symphony is an open source web application framework written in PHP and is built on

How to clear cache data in QQ browser How to clear cache data in QQ browser Feb 24, 2024 pm 01:55 PM

How to clear the cache data of QQ Browser? QQ Browser will store most of the content data after being used for a long time, but most friends do not know how to clear the cache data. Next, the editor brings players clear cache data of QQ Browser. Method tutorial, interested players come and take a look! QQ Browser usage tutorial QQ Browser How to clear cached data 1. First open the QQ Browser APP, enter the [My] area in the lower right corner of the main page, and select the [Settings] function; 2. Then on the settings function page, find the [Clear browsing data]; 3. Finally, check the content you need to clean and click [One-click cleanup] at the bottom.

See all articles