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µÄÖµconnStr±ØÐëÓëÉÏÃæ¶¨ÒåµÄÁ¬½Ó´®½ÚµãnameµÄÖµÏàͬ-->
<a
Ïà¹ØÎĵµ£º
wap.71now.com
Ãâ·ÑwapÍøÖ·´óÈ«
wap.feiku.com ·É¿âÊé³Ç
fywap.net ·çÓïÐ¡ËµÍø
3gyd.net 3GÒÆ¶¯Êé³Ç
book.11222.cn ÊéÆìÍø
bookwap.net µÆ»ðÊé³Ç
wap.my236.cnÊÖ»ú×ÊÔ´Íø
kong.net/book¿ÕÖÐÍø
good13.cn 13ºÅÊéÕ¾
wx.cmfu.com ÆðµãÍø
zzwx.netÖ¸ÕÆÎÄÑ§Íø
bbokk.comÌì¿ÕÎÄѧ
wapgd.cn¹ã¶«ÊéÎÝ
wap.tdwap.cnÌìµ ......
£¨Ê®¶þ.2£©WCSSÊäÈëÀ©Õ¹
Èç¹ûÖµÓï·¨´íÎó£¬ÔòWAPä¯ÀÀÆ÷ºöÂÔ¸ÃÊôÐÔ¡£
Ò²¿ÉÒÔ°üº¬×ªÒå×Ö·û£º’\’ÔÚWCSSÖÐÊÇÌØÊâ×Ö·û£¬Ê¹ÓÃ’\\’¡£
¿ØÖÆÎı¾¿òÊÇ·ñ¿ÉÒÔÁô¿Õ£º-wap-input-required£¨ÖµÎª£ºfalseºÍtrue £©£¬°ïÖú¿ØÖÆÎı¾¿òÊÇ·ñ¿ÉÒԿհס£Ê¹ÓÃÔªËØÍ¬ÉÏ¡£
&n ......
×î½üÒª×öÁ½¸öÒ³Ãæ¹ØÓÚwap×¢²áµÄ£¬ÒªÇóÑé֤ÿ¸öÊäÈëµÄÊôÐÔµÄÀàÐÍ×Ö·û£¬»¹Òªµ¯³öÑé֤ʲôµÄ£¬Å¼²»»áѽ~ÓÚÊǾͿ´¿´ÍøÉÏһЩÀàËÆµÄ³ÌÐò»¹ÊDz»ÐУ¬ÓÈÆäÊÇwmlscriptµÄwmlsÎļþÔÚµ÷ÓõÄʱºòÊÖ»ú×ÜÊÇÏÔʾÏÂÔØÎļþ£¬ÓôÃÆ~~Ï£ÍûÔÚѧѧÁË~~
inputÊôÐÔÖÐemptyokÊôÐÔ£¬Ö»ÓÐÔÚÓû§Ìîд¹ýÒ»¸öÊôÐÔʱÔÙ×¢²á²ÅÌáʾûÓÐÌîдÍêÕû£¬Èç¹ûÓû§Ò»¸ ......
ÊÖ»úÉÏÍøÔ½À´Ô½ÆÕ¼°£¬ÊÖ»úÖÖÀàÔ½À´Ô½¶à£¬Òª¿ª·¢Ò»¸ö¹©ÊÖ»ú·ÃÎÊÍøÕ¾²¢¼æÈÝËùÓв»Í¬ÀàÐ͵ÄÊÖ»úºÍä¯ÀÀÆ÷ÊǺܲ»ÈÝÒ׵쬱±¾©Ê¦·¶´óѧ×ÔϰÊÒ²éѯƽ̨µÄÊÖ»ú°æ×î³õÊÇÖ±½ÓÓÃASP.NETʵÏֵģ¬Ö»ÊÇÓÃCSS¶¨Òå³ÉÁËÊʺÏÊÖ»úÆÁÄ»µÄÒ³Ãæ£¬ËäȻͬѧÃÇ·ÃÎÊ»ù±¾Ã»ÓÐÎÊÌ⣬µ«ÊÇҲż¶û»áÓГ²»ÄÜÑ¡ÔñÏÂÀ²Ëµ¥”¡¢“°´Å¥button²»Ä ......