멀티라인그리드 » Api
imagecacheflush
Description
멀티라인그리드내에서 사용되는 이미지캐쉬에서 원하는 이미지를 삭제할수 있는 API이다.
파라미터 strImageURL에 Empty("")값을 주는경우 캐쉬의 모든 이미지가 삭제된다.
캐쉬에서 이미지를 삭제하는 경우 잘못 사용하게 되면 매번 이미지를 DB나 웹서버에서
다운받기 때문에 Painting속도나 처리 속도가 현저히 나빠지게 된다.
따라서 해당 API사용시에는 주의가 필요하다.
Parameters
Parameters |
Type |
Description |
strImageURL |
STRING |
캐쉬에서 삭제할 이미지 경로 |
Return Value
Example
// imagecacheflush API의 잘못된 사용예
// 아이템에 이미지를 설정할때마다 새로이 다운 받음.
function btnTest_on_mouseup(objInst)
{
var strImageURL = "http://192.168.0.123/image/testimage.gif";
for(var nRow = 0;nRow < mgrid.getrowcount();nRow++) {
mgrid.imagecacheflush(strImageURL);
mgrid.setitemimage(0, nRow, strImageURL);
}
}
// imagecacheflush API의 올바른 사용예
// 아이템에 이미지가 없는경우 다운받고 그 이후는 캐쉬의 이미지를 사용하게됨
function btnTest_on_mouseup(objInst)
{
var strImageURL = "http://192.168.0.123/image/testimage.gif";
// 혹시 이미지가 그리드캐쉬에 존재한다면 삭제.
mgrid.imagecacheflush(strImageURL);
for(var nRow = 0;nRow < mgrid.getrowcount();nRow++) {
mgrid.setitemimage(0, nRow, strImageURL);
}
}
Viewer Ver.
9.1.1.1
Update Date
20150624