Sdwebimage clear cache method

First, clear the cache through SDWebImage

The specific implementation is as follows

/ / Calculate check the cache size

Float tmpSize = [[SDImageCache sharedImageCache]checkTmpSize];

NSLog(@"%f",tmpSize);

self.clearCacheName = tmpSize 》= 1 ? [NSString stringWithFormat:@"%.1fM",tmpSize] : [NSString stringWithFormat:@"%.1fK",tmpSize * 1024];

//clear cache

- (void)clearTmpPics

{

[[SDImageCache sharedImageCache] clearDisk];

[[SDImageCache sharedImageCache] clearMemory]; / / may or may not

}

Second, Sdwebimage manual clear cache method

1. Find the SDImageCache class

2. Add the following method:

Sdwebimage clear cache method

The new version of the SDImageCache class has been added to this method.

Sdwebimage clear cache method

3. Use this in the settings

Sdwebimage clear cache method

Third, iOS SDWebImage empty cache new method

1, clean up old image data

[[SDImageCache sharedImageCache] clearDisk];

[[SDImageCache sharedImageCache] clearMemory]; / / can not write

Recently updated the SDWebImage package found that the previous [[SDImageCache sharedImageCache] clearDisk] this method directly reports the error, see the source code to know, this method was replaced by another new method:

Sdwebimage clear cache method

It can be seen that the new method has one more block. This place is for the convenience of directly executing a certain business code after we have finished the work of clearing the image cache. Of course, you can also directly give this block a nil, do not deal with it.

After the update, we can also use the following way to clear the image cache:

2, clear the picture cache

[[SDImageCache sharedImageCache] clearDiskOnCompleTIon:nil];

[[SDImageCache sharedImageCache] clearMemory]; / / can not write

Differential Pressure Sensor

Differential pressure sensor (DPS) is a sensor used to measure the difference between two pressures. It is usually used to measure the pressure difference between the front and rear ends of a certain equipment or component.

Looseness often occurs during installation. The transmitter is connected with the three valve manifold. The bolts should be tightened diagonally. Generally, they cannot be locked at one time. The sealing ring should be densified during the installation of the three valve manifold.

Differential Pressure Sensor,Differential Pressure Transmitter Sensor,Differential Air Pressure Sensor,Adjustable Differential Pressure Sensor

Taizhou Jiabo Instrument Technology Co., Ltd. , https://www.jbcbyq.com