WapÁ÷Á¿Í³¼Æ¿ª·¢ÖÐʹÓÃCacheÐĵÃ
ÔÚ¡¶Ëû¾ËÍøwapÁ÷Á¿Í³¼Æ·ÖÎöƽ̨¡·¿ª·¢ÖÐΪÁËÌá¸ßϵͳµÄÐÔÄÜ£¬ÎÒÃÇÀûÓÃCacheÀ´±£´æÊý¾Ý£¬ÀýÈç°ÑÓû§µÄһЩȨÏÞÐÅÏ¢·ÅÔÚCacheÖУ¬µ«ÕâÑù×ö»áÓÐ
ЩÎÊÌ⣬ºÎʱÇå³ýCacheÓëÊý¾Ý±£³Öͬ²½£¬ÏÂÃæÎÒÔÚÏîÄ¿ÖÐʹÓÃCacheµÄÐĵã¬Óë´ó¼Ò·ÖÏí¡£
Ò»¡¢ÀûÓÃCacheDependency
Àà
¡¡¡¡ËüÔÚÃüÃû¿Õ¼äSystem.Web.CachingÖС£CacheDependencyÀà»áÓëÎļþÖ®¼ä½¨Á¢ÒÀ¸½ÐÔ¹ØÏµ¡£ÔÚÎļþ¸ü¸Äʱ£¬¸Ã
CacheÏî»á×Ô¶¯ÒƳý¡£
·½·¨:
¡¡¡¡°ÑÓû§È¨ÏÞÐÅÏ¢±£Áô³ÉXMLÎļþ£¬µ±¹ÜÀíÔ±¸üÐÂÊý¾Ýʱ£¬Í¬Ê±¸üÐÂÕâ¸öXMLÎļþ¡£
´ú
Â룺
//CahceֵΪXMLÎļþÄÚÈÝ
XmlDocument doc = Cache["user"] as
XmlDocument;
if (doc == null)
{
doc = new XmlDocument();
string filePath =
Server.MapPath("user.xml");
¡¡¡¡//½¨Á¢ÒÀÀµÏî
CacheDependency c
= new CacheDependency(filePath);
doc.Load(filePath);
¡¡
¡¡//½¨Á¢ÒÀÀµ¹ØÏµ
Cache.Insert("skin", doc, c
,Cache.NoAbsoluteExpiration
,TimeSpan.fromMinutes(30)
);
}
¶þ¡¢ÀûÓÃSqlCacheDependencyÀà
¡¡¡¡ËüÒ²ÔÚÃüÃû¿Õ¼ä
System.Web.CachingÖУ¬SqlCacheDependency»áÓëÊý¾Ý¿â±í»òSQL
Server²éѯ½á¹û½¨Á¢ÒÀÀµ¹ØÏµ£¬ÕâÖÖ·½·¨²Ù×÷±È½Ï¸´ÔÓ¡£
²½¾Û1:
ÔÚWeb.ConfigÎļþÖÐÔö¼ÓÊý¾Ý¿âÁ¬½Ó´®ÓëCache
ÅäÖýڵ㡣
<configuration>
<appSettings/>
<connectionStrings>
<add name="connStr"
connectionString="server=192.168.1.24;uid=sa;pwd=l23;database=CacheTest;"/>
</connectionStrings>
<system.web>
<caching>
<sqlCacheDependency>
<databases>
<!--½ÚµãconnectionStringNamµÄÖµco
Ïà¹ØÎĵµ£º
ʹÓÃwap css¿ÉÒÔ°ÑÄÚÈݺͱíʾ·ÖÀ룬ºÃ´¦£º
1.ʹÓÃwcssʹÄÚÈݺÍÑùʽ·ÖÀ룬¿ÉÒÔΪ²»Í¬ÊÖ»ú£¬Éè¼Æ¼¸¸ö°æ±¾wap css style sheet ºÍÖ¸¶¨²»Í¬ÆÁ
Ä»´óС¡£ÄÚÈÝÈ´²»ÐèÒªÐ޸ġ£
2.Ϊ²»Í¬É豸£¬ÈçPC,PDA,MOBILE PHONE£¬×¼±¸²»Í¬Ñùʽ±í£¬ÄÚÈݲ»ÐèÒª¸Ä±ä¡£
3.¼õÉÙά»¤Ò»¸öwapÕ¾µã£¬µ±ÓÐеĵ绰£¬Ö»ÐèÒªÔö¼ÓеÄÑùʽ±í£¬ÄÚÈݲ»ÐèÒ ......
ÔÚ¡¶Ëû¾ËÍøwapÁ÷Á¿Í³¼Æ·ÖÎöƽ̨¡·¿ª·¢ÖÐΪÁËÌá¸ßϵͳµÄÐÔÄÜ£¬ÎÒÃÇÀûÓÃCacheÀ´±£´æÊý¾Ý£¬ÀýÈç°ÑÓû§µÄһЩȨÏÞÐÅÏ¢·ÅÔÚCacheÖУ¬µ«ÕâÑù×ö»áÓÐЩÎÊÌ⣬ºÎʱÇå³ýCacheÓëÊý¾Ý±£³Öͬ²½£¬ÏÂÃæÎÒÔÚÏîÄ¿ÖÐʹÓÃCacheµÄÐĵã¬Óë´ó¼Ò·ÖÏí¡£
Ò»¡¢ÀûÓÃCacheDependencyÀà
¡¡¡¡ËüÔÚÃüÃû¿Õ¼äSystem.Web.CachingÖС£CacheDependencyÀà»áÓëÎ ......
Ëæ×Å3GÔÚÖйúµÄ·¢Õ¹ÒÔ¼°ÊÖ»úÉÏÍøÓû§µÄÔö³¤£¬Ãâ·Ñwap×÷ΪÊÖ»ú¹ã¸æµÄÔØÌå¡£WAPÕ¾³¤ÆÈÇÐÐèÒªÈçºÎÁ˽âÓû§£¬°ÑÎÕÓû§£¬·¢Õ¹Óû§£¬¶øÒÀÀµ¹ã¸æ·Ö³É£¬µã»÷¼Æ·ÑΪÖ÷ÒªÓ¯ÀûÊֶεÄÕ¾³¤¸üÐèÒªÁ÷Á¿µÄ¹«Ö¤ÐÔÒÔ»»È¡Óë¹ã¸æ¿Í»§Ì¸¼Û¸ñµÄÖ±½Ó³ïÂë¡£ËùÒÔ¾ÍÓÐÁ˹ØÓÚWAPÁ÷Á¿Í³¼ÆµÄ¸÷¸öÕ¾µã£¡
²» ......
ÈÈÏߣº021-51875830 62450161 0755-61280252
´«Õ棺021-62450161 0755-25912501
ÒµÎñÊÖ»ú:15921673576
ÏêÇéÇë·ÃÎÊÍøÕ¾£ºhttp://www.bjzhda.cn/
http://www.51qianru.cn
  ......
MIDP 1.0ÖÐûÓÐÌṩµç»°ºô½ÐµÄ¹¦ÄÜ¡£ÔÚMIDP 2.0ÖУ¬javax.microedition.midlet.MIDletÀàÌṩÁËplatformRequest()·½·¨À´ÇëÇóÉ豸À´Íê³ÉÌØ¶¨µÄÇëÇó£¬ÇëÇóµÄÄÚÈÝÓÉplatformRequest()·½·¨µÄStringÀàÐ͵IJÎÊýurlÀ´±êʶ¡£¿ÉÄÜÊǵ÷ÓÃä¯ÀÀÆ÷´ò¿ªÄ³¸öÌØ¶¨µÄwapÒ³Ãæ£¬Ò²¿ÉÒÔÊǺô½Ðµç»°¡£ÔÚÉ豸×ÊÔ´¿ÉÓõÄʱºò£¬ÏµÍ³»á°ÑMIDlet·ÅÔÚºǫ́ ......