caching

Fatal error: Uncaught SoapFault exception: [env:Client] Internal Error

…衆ロ難τιáo~ 提交于 2020-01-06 12:43:57
问题 I'm trying to send test message with my PHP SOAP client. I'm using BeSimpleSoap library because I had problems with standard PHP SOAP calss and NuSOAP class. Part of the scriptis is: $client = new BeSimple\SoapClient\SoapClient("GSBService.wsdl", array( "trace"=>1, "exceptions"=>1, 'location'=>$SERVICE_TEST, "local_cert" =>$SOAP_cert, 'uri'=>$NAMESPACE_URI, "passphrase"=>$cert_password, "connection_timeout" => 60)); var_dump($client->echo('abc1234')); print_r( $client->sendMessage($par

Image reload prototype if-modified

爱⌒轻易说出口 提交于 2020-01-06 11:48:40
问题 I use prototype on the client side. I need to change picture on the page without reloading. So in my .js file I change the src of a picture and it works ok. But I also need that if the same image requested, it would alse request the server to know if this image has changed, and reload if needed. Server sends last-modified header, and if gets if-modified-Since, then checks, and either sends new image or 304 Not Modified response. When the image is requested the first time, server replies with

Image reload prototype if-modified

谁说胖子不能爱 提交于 2020-01-06 11:48:28
问题 I use prototype on the client side. I need to change picture on the page without reloading. So in my .js file I change the src of a picture and it works ok. But I also need that if the same image requested, it would alse request the server to know if this image has changed, and reload if needed. Server sends last-modified header, and if gets if-modified-Since, then checks, and either sends new image or 304 Not Modified response. When the image is requested the first time, server replies with

I'm trying to dispose of an object when the system is low on memory - is there a better way than this?

寵の児 提交于 2020-01-06 11:24:09
问题 What I am doing currently is adding an item to the Cache and disposing of my object when that object is removed from the Cache. The logic being that it gets removed when memory consumption gets too high. I'm open to outher suggestions but I would like to avoid creating a thread than continually measures memory statistics if possible. Here is my code: public class WebServiceCache : ConcurrentDictionary<string, WebServiceCacheObject>, IDisposable { private WebServiceCache() { if (HttpContext

How to clear cacheKey in separate instance of IMemoryCache

蹲街弑〆低调 提交于 2020-01-06 10:07:47
问题 I'm running on ASP.NET Core 1.1 where in my Startup.cs I configure Policies, as well as DistributedMemoryCache , like this: var roleRepo = new RoleRepo(Configuration, new MemoryCache(new MemoryCacheOptions())); services.Configure<AuthorizationOptions>(options => { options.AddPolicy("MyPolicy", policy => policy.Requirements.Add(new MyPolicyRoleRequirement(roleRepo))); }); services.AddDistributedMemoryCache(); //... services.AddTransient<IRoleRepo, RoleRepo>(); The problem I'm having is I'm

How to clear cacheKey in separate instance of IMemoryCache

ε祈祈猫儿з 提交于 2020-01-06 10:05:19
问题 I'm running on ASP.NET Core 1.1 where in my Startup.cs I configure Policies, as well as DistributedMemoryCache , like this: var roleRepo = new RoleRepo(Configuration, new MemoryCache(new MemoryCacheOptions())); services.Configure<AuthorizationOptions>(options => { options.AddPolicy("MyPolicy", policy => policy.Requirements.Add(new MyPolicyRoleRequirement(roleRepo))); }); services.AddDistributedMemoryCache(); //... services.AddTransient<IRoleRepo, RoleRepo>(); The problem I'm having is I'm

How to order objects in Hibernate and/or distributed enviroment?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-06 08:49:10
问题 I need to keep certain objects in an arbitrary order (dictated by the user, at will) but I do not know which would be the best approach. I have been thinking in just set an integer order field in my entities and make the user order them but this approach troubles me because we have 3 servers dispatching requests and I believe that if I update the order in the database it forces me to update/merge my entitites every time I want to make calculations based on that order. The other approach would

performance of fortran matrix operations

旧时模样 提交于 2020-01-06 05:49:07
问题 I need to use Fortran instead of C somewhere and I am very new to Fortran. I am trying to do some big calculations but it is quite slow comparing to C (maybe 10x or more and I am using Intel's compilers for both). I think the reason is Fortran keeps the matrix in column major format, and I am trying to do operations like sum(matrix(i, j, :)), because it is column major, probably this uses the cache very inefficiently (probably not using at all). However, I am not sure if this is the actual

PDO and caching, how to implement it in a database class?

痴心易碎 提交于 2020-01-06 04:36:14
问题 When using PDO and MySQL, is there any benefit in caching results that I know I am going to be using multiple times on the same page? Or does PDO / MySQL automatically handle this sort of thing? And if I should do it myself, should I store the actual results from a query, or could I just store the PDOStatements in a cache and reuse them? Of course I could store any result I know I'm going to use multiple times on a page in a variable, but it just seems cleaner to let my database class handle

Java LRU cache using LinkedList

…衆ロ難τιáo~ 提交于 2020-01-06 04:25:27
问题 new to stack-overflow so please dont mind my noob way of asking this. I'm trying to implement LRU caching using a linked list, I've seen other implementations here using linkedHashMap and other data structures but for this case i'm trying to create the best optimized version using linked lists as i was asked during a technical round. I've limited the cache size here to 3 Is there any way to better optimize this LRU implementation ? Also what will be the time complexity for this implementation