How to cache json files with dispatcher?

Our project is unique in that we want to cache particular json files. Our performance will rely on it. However it seems dispatcher is only capable of caching HTML. This will be real bad news for us if it's impossible.
In our /cache configuration, we'd like to do:
/rules
  /0000
    /glob "*.html"
    /type "allow"
  /0001
    /glob "*.docache.json"
    /type "allow"
Unfortunately, after requesting the json file through the dispatcher, the file is not cached at all, even if doing /glob "*" /type "allow"

Depends what you mean by clear out. Dispatcher does two things on activation request: invalidate and evict.
Invalidation:
find the /invalidate section of your dispatcher.any and add :
/0001
            /glob "*.json"
            /type "allow"
Obviously you'll need to change the numeric ID of the rule from 0001 to whatever makes sense for you.
Eviction (deletion):
If /mypath/mypage is being activated, then only files meeting globbing pattern /mypath/mypage.* will be deleted, such as /mypath/mypage.html and /mypath/mypage.json... however, child directories WILL NOT be evicted, such as /mypath/mypage/jcr_content/parsys/mycomponent.json
Bang - buncha info for yah.

Similar Messages

  • How to parse json files

    Hi
    Can anyone help with some In depth tutorials on how to parse json files locally (in the project folder) and online (webservice) in WP8 development
    Thank you in advance
    Jayjay john

    1. Build up a strong type class for this json
    Visual Studio 2013 Hidden Gem: Paste JSON or XML as C# Classes
    2. use Json.Net to Deserialize , like:
    var result = Newtonsoft.Json.JsonConvert.DeserializeObject<yourdatatype>(jsonstring);
    Working with JSON in C#
    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。

  • How to delete the file with space in name

    Hi
    I want to delete the file "test ex.txt" file.
    i run the following command in command prompt.i can delete the file successfully.
    /bin/rm -f /mnt/"test ex.txt"
    I want to run the command from java.So i am using the following code
    String cmd = "/bin/rm -f /mnt/\"test ex.txt\"";
         Runtime rt = Runtime.getRuntime();
    process = rt.exec(cmd);
    The file was not deleted.
    How to delete the file with space in name?
    Help me

    Use the form of exec that takes an array of command + args.
    arr[0] = "/bin/rm"
    arr[1] = "-f"
    arr[2] = "/home/me/some directory with spaces";Or use ProcessBuilder, which is the preferred replacement for Runtime.exec, and which Runtime.exec calls.

  • How to open a file with the extension x3f (sigma)

    how to open a file with the extension x3f (sigma)?

    RAW data from the following Sigma cameras is currently supported:
    DP1
    DP1s
    DP2
    SD9
    SD10
    SD14
    If your camera is among these, then simply import the photo as usual. https://helpx.adobe.com/lightroom/help/importing-photos-lightroom-basic-workflow.html

  • How to validate xml file with XSD schema ??  in JDK1.4.2

    How to validate xml file with XSD schema ?? in JDK1.4.2
    i dont want to use new Xerec Jar ...
    Suggest option ...

    Please do not double-post. http://forum.java.sun.com/thread.jspa?threadID=5134447&tstart=0
    Then use Stax (Woodstock) or Saxon.
    - Saish

  • How to create pdf files with text field data

    how to create pdf files with text field data

    That looks like it should work, but it doesn't.
    I opened the PDF I had created from Word in Acrobat (X Pro). Went to File > Properties. Selected "Change Settings". I then enabled "Restrict editing...", set a password, set "Printing Allowed" to "none", "Changes Allowed" to "none", and ensured that "Enable copying of text..." was disabled.
    I saved the PDF file, closed Acrobat, opened the PDF in Reader, and I was still able to select text and graphical objects.
    I reopened the PDF in Acrobat, and the document summart still shows everything as allowed. When I click on "show details" (from File > Properties) it shows the correct settings.
    Any ideas?

  • How should i share file with other devices such as nokia,blackberry and etc using bluetooth

    I want to share  files between other deivce such as nokia but couldnt, could u help me tell how can i share files with other devices???

    @AKRBTN: Thanks for the reply and info.
    That is a solution, but it really isn't viable.
    It is sad that apple refuses to support this.
    A simple example: Sitting somewhere with no signal and you want to share a file (photo) with your colleague or friend, who happens to be right next to you.
    Or even if there is signal and you don't want to be paying fees or data charges.
    Or you may be in a rehearsal studio and need to share that very important file and have no time to go outside and get signal and try to send the file, which then everyone else has to go outside and catch the signal and pay fees.
    Anyway, I see that this is a dead end with apple, so I guess I will be back to carrying 2 phones around again.
    Peace,
    SB

  • How could I delete files with name string with "TAL" and older than 05.05.

    How could I delete files with name string with "TAL" and older than 05.05.2009 on unix

    Our ECC Ides system today was not responsible. For first time 17 users were working on the systtem (IWN2008/SQL2005 based). Before the people were maximally 5.
    The server is done by making a homogeneous system copy from an blade machine(now it is an VIrTUAL)
    There was enaught disk space. However I checked Wokload 03sdn transaction) inn system. and found out that at that time of restarting(I had to restart system 3 times to get logged on the system and even then it was almost unresponsive.
    I can found in there top abap."Login_Pw", "SESSION_MANAGER", "?". (BAtch), "ADMSBUF, >DEleyed Function call, RSPOWPOO""RSWWclear", ""VA01", "SAPMHHTP  "Buf  Sync" >DDLOC CLEANUP)""rsbtctE"
    What can I do?
    ¸
    Who could interfer SAP_CCMS_MONI_BATCH_DPSAP_CCMS_MONI_BATCH_DP
    the 2 main users under users profile were ZUGTIN running and SAPSYS( running many system jobs)
    How to approach the problem

  • How do I merge 6 older saved json files with bookmarks in FF 23.0.1? Thanks

    I have 6 old json files from discarded computers to merge with current bookmarks in ff 23.0.1. Looking for a utility that will combine all into one bookmark folder. Thanks in advance.
    Application Basics
    Name
    Firefox
    Version
    23.0.1
    User Agent
    Mozilla/5.0 (Windows NT 5.1; rv:23.0) Gecko/20100101 Firefox/23.0
    Build Configuration
    about:buildconfig
    Extensions
    Name
    Version
    Enabled
    ID
    Adblock Plus
    2.3.2
    true
    {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}
    Anti-Banner
    13.0.2.600
    true
    [email protected]
    LinkmanFox
    8.80.0.0
    true
    {A81031F3-6CEE-4A19-809F-4E26C1D9C1D1}
    Advanced SystemCare Surfing Protection
    1.0
    false
    [email protected]
    Content Blocker
    13.0.2.600
    false
    [email protected]
    Kaspersky URL Advisor
    13.0.2.600
    false
    [email protected]
    Microsoft .NET Framework Assistant
    0.0.0
    false
    {20a82645-c095-46ed-80e3-08825760534b}
    Safe Money
    13.0.2.600
    false
    [email protected]
    Safe Monitor
    2.6.22
    false
    [email protected]
    Virtual Keyboard
    13.0.2.600
    false
    [email protected]
    Important Modified Preferences
    Name
    Value
    accessibility.typeaheadfind.flashBar
    0
    browser.cache.disk.capacity
    358400
    browser.cache.disk.smart_size.first_run
    false
    browser.cache.disk.smart_size.use_old_max
    false
    browser.cache.disk.smart_size_cached_value
    358400
    browser.places.smartBookmarksVersion
    4
    browser.search.useDBForOrder
    true
    browser.startup.homepage_override.buildID
    20130814063812
    browser.startup.homepage_override.mstone
    23.0.1
    dom.mozApps.used
    true
    dom.w3c_touch_events.expose
    false
    extensions.lastAppVersion
    23.0.1
    network.cookie.prefsMigrated
    true
    places.database.lastMaintenance
    1376975654
    places.history.expiration.transient_current_max_pages
    50286
    plugin.disable_full_page_plugin_for_types
    application/pdf
    plugin.importedState
    true
    privacy.sanitize.migrateFx3Prefs
    true
    security.disable_button.openCertManager
    false
    security.OCSP.disable_button.managecrl
    false
    security.OCSP.enabled
    0
    storage.vacuum.last.index
    0
    storage.vacuum.last.places.sqlite
    1376975858
    user.js Preferences
    Your profile folder contains a
    user.js file, which includes preferences that were not created by Firefox.
    Graphics
    Adapter Description
    ATI Radeon Xpress 1150 Series
    Adapter Drivers
    ati2dvag
    Adapter RAM
    Unknown
    Device ID
    0x5974
    Direct2D Enabled
    Blocked for your graphics driver version. Try updating your graphics driver to version 10.6 or newer.
    DirectWrite Enabled
    false (0.0.0.0)
    Driver Date
    7-22-2006
    Driver Version
    8.261.4.0
    GPU #2 Active
    false
    GPU Accelerated Windows
    0/1 Basic Blocked for your graphics driver version. Try updating your graphics driver to version 9.6 or newer.
    Vendor ID
    0x1002
    WebGL Renderer
    Blocked for your graphics driver version. Try updating your graphics driver to version 9.6 or newer.
    AzureCanvasBackend
    skia
    AzureContentBackend
    none
    AzureFallbackCanvasBackend
    cairo
    JavaScript
    Incremental GC
    true
    Accessibility
    Activated
    false
    Prevent Accessibility
    0
    Library Versions
    Expected minimum version
    Version in use
    NSPR
    4.10
    4.10
    NSS
    3.15 Basic ECC
    3.15 Basic ECC
    NSSSMIME
    3.15 Basic ECC
    3.15 Basic ECC
    NSSSSL
    3.15 Basic ECC
    3.15 Basic ECC
    NSSUTIL
    3.15
    3.15

    By the way, to spell out a previously mentioned approach to gathering all your bookmarks from the old JSON files (https://support.mozilla.org/en-US/questions/968777#answer-470541):
    (1) Create a new blank profile
    (2) Restore a JSON file (see [[Restore bookmarks from backup or move them to another computer]])
    (3) Export the restored bookmarks to an HTML format in a convenient location, with a unique file name (see [[Export Firefox bookmarks to an HTML file to back up or transfer bookmarks]])
    (4) Repeat Steps 2 and 3 until you have HTML format exports of all the old bookmarks
    (5) Exit Firefox and start up in your normal profile
    (6) Import all the HTML files (see [[Import Bookmarks from a HTML file]])
    Likely, you will have lots of duplicates, but you will have everything in one place at least.

  • How to start a cache config file with proxy-scheme

    Hi all,
    The below is my cache-config file taken from coherence extend example.
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>*</cache-name>
    <scheme-name>dist-default</scheme-name>
    </cache-mapping>
    <cache-mapping>
    <cache-name>*</cache-name>
    <scheme-name>example-remote</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <distributed-scheme>
    <scheme-name>dist-default</scheme-name>
    <lease-granularity>member</lease-granularity>
    <backing-map-scheme>
    <local-scheme/>
    </backing-map-scheme>
    <autostart>true</autostart>
    </distributed-scheme>
    <distributed-scheme>
    <scheme-name>example-remote</scheme-name>
    <lease-granularity>member</lease-granularity>
    <backing-map-scheme>
    <local-scheme/>
    </backing-map-scheme>
    <autostart>true</autostart>
    </distributed-scheme>
    <proxy-scheme>
    <service-name>ExtendTcpProxyService</service-name>
    <thread-count>5</thread-count>
    <acceptor-config>
    <tcp-acceptor>
    <local-address>
    <address>localhost</address>
    <port>9009</port>
    </local-address>
    </tcp-acceptor>
    </acceptor-config>
    <autostart>true</autostart>
    </proxy-scheme>
    </caching-schemes>
    </cache-config>
    In order to start the proxy cache server on localhost:9009 should i use the DefaultCacheServer program only/ I tried to use a SimpleCacheExplore program with the above config and it didnt start the proxy-scheme on localhost. is there anything i am missing?
    Regards
    S

    Hello,
    I ran the following with your cache configuration:
    java -cp coherence.jar -Dtangosol.coherence.cacheconfig=coherence-cache-config.xml com.tangosol.net.DefaultCacheServer...and got the following output:
    2010-01-04 10:23:54.363/5.477 Oracle Coherence GE 3.5.2/463p2 <Info> (thread=Proxy:ExtendTcpProxyService:TcpAcceptor, member=1): TcpAcceptor now listening for connections on 10.149.189.62:9009
    Services
      TcpRing{TcpSocketAccepter{State=STATE_OPEN, ServerSocket=10.149.189.62:8088}, Connections=[]}
      ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_JOINED), Id=0, Version=3.5, OldestMemberId=1}
      InvocationService{Name=Management, State=(SERVICE_STARTED), Id=1, Version=3.1, OldestMemberId=1}
      DistributedCache{Name=DistributedCache, State=(SERVICE_STARTED), LocalStorage=enabled, PartitionCount=257, BackupCount=1, AssignedPartitions=257, BackupPartitions=0}
      ProxyService{Name=ExtendTcpProxyService, State=(SERVICE_STARTED), Id=3, Version=3.2, OldestMemberId=1}
      )The proxy service appears to be running using DefaultCacheServer and this configuration. Does your output look any different?
    Thanks,
    Patrick

  • How to upload large file with http via post

    Hi guys,
    Does anybody know how to upload large file (>100 MB) use applet to servlet with http via post method? Thanks in advance.
    Regards,
    Mark.

    Hi SuckRatE
    Thanks for your reply. Could you give me some client side code to upload a large file. I use URL to connect to server. It throws out of memory exception. The part of client code is below:
    // connect to the servlet
    URL theServlet = new URL(servletLocation);
    URLConnection servletConnection = theServlet.openConnection();
    // inform the connection that we will send output and accept input
    servletConnection.setDoInput(true);
    servletConnection.setDoOutput(true);
    // Don't used a cached version of URL connection.
    servletConnection.setUseCaches (false);
    servletConnection.setDefaultUseCaches(false);
    // Specify the content type that we will send text data
    servletConnection.setRequestProperty("Content-Type",
    +"application/octet-stream");
    // send the user string to the servlet.
    OutputStream outStream = servletConnection.getOutputStream();
    FileInputStream filein = new FileInputStream(largeFile);
    //BufferedReader in = new BufferedReader(new InputStreamReader
    +(servletConnection.getInputStream()));
    //System.out.println("tempCurrent = "+in.readLine());
    byte abyte[] = new byte[2048];
    int cnt = 0;
    while((cnt = filein.read(abyte)) > 0)
    outStream.write(abyte, 0, cnt);
    filein.close();
    outStream.flush();
    outStream.close();
    Regards,
    Mark.

  • How to package .json files for use in an ANE for iOS

    I am creating an Adobe Native Extension (ANE) for use with iOS. The native code in the main .a library file used for the ANE depends on 3rd party frameworks which themselves depend on the definitions of JSON objects defined in several .json files. I can package the 3rd party frameworks with the ANE just fine - it's the .json files that I'm having difficulties with.
    I've tried packaging the .json files into the main .a library file, although I don't know if I did it the right way.
    Please help.

    You can read through the resources documentation for iOS here:
    http://help.adobe.com/en_US/air/extensions/WSf268776665d7970d-2e74ffb4130044f3619-7ff8.htm l
    Of particular interest is the line:
    "3. It moves the resource files to the top-level directory of the application."
    So not sure if you are using an ant build script or whatever to build your ANE, but as long as you place these json files into the folder with your library when you build the ANE, these will end up getting copied to the top-level directory of the application when an application is built using this ANE.
    This is exactly how I include an iOS .bundle of resources along with a .a in an ANE and it works fine. Nice clean packaging when distributing the ANE too.

  • How to cache a file

    hi all,
    I need to cache a file into memory and read it out.
    how do i do that? is there any tutorial for file cache-ing
    thanks

    but the file can be really big or small.
    with byte array i have to specify a size ahead of time, which i dont want.

  • Trying to read/parse a JSON file with idocscript in 10gr4

    Hello all,
    I have checked a JSON file into Content Server and would like to parse the data in it and use it to define which wcmPlaceholder to use on my current page template. 
    I have tried a few things including ssIncludeXml (which returned "Failed to load XML file with Content ID..."). For business user reasons I cannot keep the data in a table or view. JSON was the best way to maintain and pass around the data and it is about 48 "rows" of data.
    Any suggestions how to accomplish this?
    Thank you,
    Audrey

    Thanks @Bex!!
    Thanks to reading your blog I have become well versed with idocsript and json and AJAX on the client side. Much that I have already accomplished is because of what you wrote!  However, that occurs too late to determine what placeholder to include in the page template.
    Is there a way to make the AJAX call on the server side to populate a variable available to the page template and then pass into the wcmPlaceholder? Do the docLoadResourceIncludes occur (and complete) before the placeholders are placed?
    I am not daunted by the XPath but I am not sure how to 'store those flags in Site Studio XML format'?
    [BTW- I had been handling this issue by requiring a "division" variable in the referrer URL but the clients have come back and want legacy URLs supported without the variable since once in the page I have shown we can determine the "division" from the JSON. ]
    Thanks,
    Audrey

  • How to send multiple files with it's original name over HTTPS using one CC?

    I am working on a File to HTTPs scenario. It is in production and working fine. Currently we send only one file and I have hard coded the name in the communication channel in the header fields. Now we have to send more files with different names and I want to use only one receiver channel instead of many. We need to send the files with their original names.
    I used the ASMA in the sender File Adapter and I see the FileName in the dynamic configuration under http://sap.com/xi/XI/System/File name="FileName".
    I know we can use a UDF in message mapping and get the value and put it in HEADERFIELDONE. But we don't want to use mapping as the files are huge and we don't want to insert XML tags in the payload.
    So how do I put the Filename from the DynamicConfiguration to the HTTP header field as FileName without using mapping? Are there any settings?
    Can I put something in the PROLOG or can I use any other module in the File Sender Adapter or is there any other option?
    Any help is appreciated.
    Thanks
    Sai

    See my blog:
    /people/stefan.grube/blog/2009/06/19/unknown-use-case-of-dynamicconfigurationbean-store-file-name-to-jms-header-without-mapping
    You have to put the configuration in sender channel, as HTTP adapter does not allow modules.
    For the second module, put values related to HTTP adapter.

Maybe you are looking for

  • HDMI, Mini Display Port and Mountain Lion

    Hello, After reading about numerous issues concerning the Mini Display Port and Mountain Lion, I'm trying to discuss it here with you all to see if there is any solution. I have a MacBook Pro (2009), and used it with my TV (HDMI cable + Mini display

  • How do i find my itunes library on my external hard drive

    My itunes library was on my old laptop.  I had my old Laptops hard drive put into an external hard drive.  Now I can't access my Itunes library.  the old laptop was Windows xp and the new laptop is windows 7.  any ideas?

  • MacBook Pro 13" Audio Output sound quality terrible after Lion upgrade

    Hi guys, I have recently upgraded my 2011 MBP 13 to Lion, and ever since have had terrible audio out sound quality, i.e. it is 'grainy' and full of feedback - very unpleasant to listen to. Is anyone else in the same boat and does anyone have the solu

  • The MRP parameters are not maintained in plant JK01

    Good morning, t-code : md04 (stock req.list) but got an error. MRP parameters for plant 'JK01' have not been maintained Message no. 61273 Diagnosis The MRP parameters are not maintained in plant JK01. Procedure Maintain MRP parameters in Customizing.

  • LV6i Graph line width

    Why does the line width of a printed chart/graph vary from the on screen width? Thanks CM