( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0000484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.10414112776require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.10464141768include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.10464141768get_header( $name = ???, $args = ??? ).../single.php:10
60.10464141984locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.10464142080load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.10464142624require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.10474150032wp_head( ).../header.php:18
100.10474150032do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.10474150248WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.10474150248WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.10494153664wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.10494153664do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.10494153880WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.10494153880WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.10504155768twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.10514157288wp_style_add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.php:440
190.10514157288WP_Styles->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.wp-styles.php:245
200.10514157288WP_Dependencies->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../class-wp-styles.php:385
210.10514157288_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.10524163240wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.10524282776trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0000484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.10414112776require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.10464141768include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.10464141768get_header( $name = ???, $args = ??? ).../single.php:10
60.10464141984locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.10464142080load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.10464142624require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.10474150032wp_head( ).../header.php:18
100.10474150032do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.10474150248WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.10474150248WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.10494153664wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.10494153664do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.10494153880WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.10494153880WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.10504155768twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.13484283880wp_style_add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.php:444
190.13484283880WP_Styles->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.wp-styles.php:245
200.13484283880WP_Dependencies->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../class-wp-styles.php:385
210.13484283880_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.13484284200wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.13494284424trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

利用memcached java client一个简单的应用

利用memcached java client一个简单的应用


1.memcached java client一个实现的下载地址


http://www.whalin.com/memcached/#download
2.  利用memcached java client 一个简单的应用


java 代码




  1. package com.danga.MemCached.test;   
  2.   
  3. import java.util.Date;   
  4.   
  5. import com.danga.MemCached.MemCachedClient;   
  6. import com.danga.MemCached.SockIOPool;   
  7.   
  8.   
  9. public class Test {       
  10.     protected static MemCachedClient mcc = new MemCachedClient();      
  11.       
  12.     static {      
  13.         String[] servers ={“192.168.40.4:12000”};      
  14.       
  15.         Integer[] weights = { 3 };      
  16.       
  17.         //创建一个实例对象SockIOPool    
  18.         SockIOPool pool = SockIOPool.getInstance();      
  19.       
  20.         // set the servers and the weights   
  21.         //设置Memcached Server   
  22.         pool.setServers( servers );      
  23.         pool.setWeights( weights );      
  24.       
  25.         // set some basic pool settings      
  26.         // 5 initial, 5 min, and 250 max conns      
  27.         // and set the max idle time for a conn      
  28.         // to 6 hours      
  29.         pool.setInitConn( 5 );      
  30.         pool.setMinConn( 5 );      
  31.         pool.setMaxConn( 250 );      
  32.         pool.setMaxIdle( 1000 * 60 * 60 * 6 );      
  33.       
  34.         // set the sleep for the maint thread      
  35.         // it will wake up every x seconds and      
  36.         // maintain the pool size      
  37.         pool.setMaintSleep( 30 );      
  38.       
  39. //        Tcp的规则就是在发送一个包之前,本地机器会等待远程主机   
  40. //        对上一次发送的包的确认信息到来;这个方法就可以关闭套接字的缓存,   
  41. //        以至这个包准备好了就发;   
  42.         pool.setNagle( false );      
  43.         //连接建立后对超时的控制   
  44.         pool.setSocketTO( 3000 );   
  45.         //连接建立时对超时的控制   
  46.         pool.setSocketConnectTO( 0 );      
  47.       
  48.         // initialize the connection pool      
  49.         //初始化一些值并与MemcachedServer段建立连接   
  50.         pool.initialize();   
  51.               
  52.       
  53.         // lets set some compression on for the client      
  54.         // compress anything larger than 64k      
  55.         mcc.setCompressEnable( true );      
  56.         mcc.setCompressThreshold( 64 * 1024 );      
  57.     }      
  58.           
  59.     public static void bulidCache(){      
  60.         //set(key,value,Date) ,Date是一个过期时间,如果想让这个过期时间生效的话,这里传递的new Date(long date) 中参数date,需要是个大于或等于1000的值。   
  61.         //因为java client的实现源码里是这样实现的 expiry.getTime() / 1000 ,也就是说,如果 小于1000的值,除以1000以后都是0,即永不过期   
  62.         mcc.set( “test”“This is a test String” ,new Date(10000));   //十秒后过期   
  63.              
  64.     }      
  65.      
  66.     public static void output() {      
  67.         //从cache里取值   
  68.         String value = (String) mcc.get( “test” );      
  69.         System.out.println(value);       
  70.     }      
  71.           
  72.     public static void main(String[] args){      
  73.         bulidCache();     
  74.         output();          
  75.     }    
  76.       
  77. }      

 



运行输出值为:



This is a test String  


 


3.注释掉buildCache();


十秒后运行,输出值为 null


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.