Search Results

Search found 7920 results on 317 pages for 'drupal cache'.

Page 5/317 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Hibernate - query caching/second level cache does not work by value object containing subitems

    - by Zoltan Hamori
    Hi! I have been struggling with the following problem: I have a value object containing different panels. Each panel has a list of fields. Mapping: <class name="com.aviseurope.core.application.RACountryPanels" table="CTRY" schema="DBDEV1A" where="PEARL_CTRY='Y'" lazy="join"> <cache usage="read-only"/> <id name="ctryCode"> <column name="CTRY_CD_ID" sql-type="VARCHAR2(2)" not-null="true"/> </id> <bag name="panelPE" table="RA_COUNTRY_MAPPING" fetch="join" where="MANDATORY_FLAG!='N'"> <key column="COUNTRY_LOCATION_ID"/> <many-to-many class="com.aviseurope.core.application.RAFieldVO" column="RA_FIELD_MID" where="PANEL_ID='PE'"/> </bag> </class> I use the following criteria to get the value object: Session m_Session = HibernateUtil.currentSession(); m_Criteria = m_Session.createCriteria(RACountryPanels.class); m_Criteria.add(Expression.eq("ctryCode", p_Country)); m_Criteria.setCacheable(true); As I see the query cache contains only the main select like select * from CTRY where ctry_cd_id=? Both RACountryPanels and RAFieldVO are second level cached. If I check the 2nd level cache content I can see that it cointains the RAFields and the RACountryPanels as well and I can see the select .. from CTRY where ctry_cd_id=... in query cache region as well. When I call the servlet it seems that it is using the cache, but second time not. If I check the content of the cache using JMX, everything seems to be ok, but when I measure the object access time, it seems that it does not always use the cache. Cheers Zoltan

    Read the article

  • How can I hide the taxonomy field for authenticated users but show it for other users in Drupal 6?

    - by Jaymie
    I have a Drupal (v6.17) Content Type which includes a Taxonomy field. I want to hide this from ordinary Authenticated Users, but want it available to my Site Contributor role users, so they can review and then assign tags to user-created nodes. I've tried overriding the Node Add/Edit form in Panels 3 by creating a panel variant especially for Authenticated Users, which would exclude the Taxonomy field. However, the Taxonomy field is bundled in with the "General Form" controls - without showing this, I don't get the Title and Body fields. Is there a way I can either include the Title and Body fields without Taxonomy, OR hide just the Taxonomy field when the authenticated user role creates a node. I realise there's a CCK field which might be able to help me out here, but how do I tie that to the Taxonomy module? Any help gratefully received.

    Read the article

  • Drupal, Views.. how to display views list + complete node, interactively ?

    - by Patrick
    hi, I'm using Views in Drupal to show node teasers. I would like now to show the complete node on the left side of my page, nearby the Views, and update it when the user click on a different teaser (better using AJAX). what's the best method to implement it. I was considering to use a lightbox, but it a bit complex (a lot of complications... such as parsing the content with javascript again.. etc). See screenshot: http://dl.dropbox.com/u/72686/viewsAndNode.png Thanks

    Read the article

  • How do I theme Form API buttons in Drupal?

    - by larssg
    The default output from Drupal's Form API is: <input id="edit-submit" class="form-submit" type="submit" value="Save" name="op"/> How do I theme that so I get: <button id="edit-submit" class="form-submit" type="submit"> <span>Save</span> </button> I need the inner span-tag so I can use the sliding doors CSS technique. I guess I need to override theme_button($element) from form.inc but my attempts so far have been unsuccessful.

    Read the article

  • Synchronizing local and remote cache in distributed caching

    - by ltfishie
    With a distributed cache, a subset of the cache is kept locally while the rest is held remotely. In a get operation, if the entry is not available locally, the remote cache will be used and and the entry is added to local cache. In a put operation, both the local cache and remote cache are updated. Other nodes in the cluster also need to be notified to invalidate their local cache as well. What's a simplest way to achieve this if you implemented it yourself, assuming that nodes are not aware of each other. Edit My current implementation goes like this: Each cache entry contains a time stamp. Put operation will update local cache and remote cache Get operation will try local cache then remote cache A background thread on each node will check remote cache periodically for each entry in local cache. If the timestamp on remote is newer overwrite the local. If entry is not found in remote, delete it from local.

    Read the article

  • Drupal 6: getting particular fields from Node Reference types...

    - by artmania
    Hi friends, I'm a drupal newbie... <?php print $node->field_date[0]['view']; ?> I can get the custom created CCK fields' value and display in tpl.php files as above... that's fine. my question is how can I get the Node reference fields' in-fields? for example, I have an event content type, and I have defined Node Reference for Location (title, address, img, etc.). When I write the code below, it displays all location content; <?php print $node->field_location[0]['view']; ?> but I need to get only address field from this location content type. sth like below would be great :D but not working; <?php print $node->field_location[0]['field_address']['view']; ?> so how can get that? appreciate helps so much! thanks a lot!

    Read the article

  • Generic wrapper for System.Web.Caching.Cache functions

    - by David Neale
    I've created a generic wrapper for using the Cache object: public class Cache<T> where T : class { public Cache Cache {get;set;} public CachedKeys Key {get;set;} public Cache(Cache cache, CachedKeys key){ Cache = cache; Key = key; } public void AddToCache(T obj){ Cache.Add(Key.ToString(), obj, null, DateTime.Now.AddMinutes(5), System.Web.Caching.Cache.NoSlidingExpiration, System.Web.Caching.CacheItemPriority.Normal, null); } public bool TryGetFromCache(out T cachedData) { cachedData = Cache[Key.ToString()] as T; return cachedData != null; } public void RemoveFromCache() { Cache.Remove(Key.ToString()); } } The CachedKeys enumeration is just a list of keys that can be used to cache data. The trouble is, to call it is quite convuluted: var cache = new Cache<MyObject>(Page.Cache, CachedKeys.MyKey); MyObject myObject = null; if(!cache.TryGetFromCache(out myObject)){ //get data... cache.AddToCache(data); //add to cache return data; } return myObject; I only store one instance of each of my objects in the cache. Therefore, is there any way that I can create an extension method that accepts the type of object to Cache and uses (via Reflection) its Name as the cache key? public static Cache<T> GetCache(this Cache cache, Type cacheType){ Cache<cacheType> Cache = new Cache<cacheType>(cache, cacheType.Name); } Of course, there's two errors here: Extension methods must be defined in a non-generic static class The type or namespace name 'cacheType' could not be found This is clearly not the right approach but I thought I'd show my working. Could somebody guide me in the right direction?

    Read the article

  • custom url for taxonomy > vocabulary at Drupal 6

    - by artmania
    Hi friends, I'm new at Drupal. a question; I create a hotels directory site. I created TaxonomyVocabulary for locations like London, Liverpool, etc... For example the url below lists the London localhost/drupal/taxonomy/term/1 how can change that url to something like localhost/drupal/hotels/london is it possible? appreciate advices so much!!

    Read the article

  • Drupal: how to set theme language programmatically?

    - by takpar
    How can i change drupal default language programmatically somewhere in code (like template.php)? (i need to overwrite default language set by admin in some cases.) i'm using drupal 6. PS: please read my own answer for more detail. and if you may help solve that PS: later i saw a module that was what i wanted. make sure take a look at it: Administration Language Drupal Module

    Read the article

  • Can't install Acquia Drupal Commons locally

    - by PatrickS
    Working on a MacbookPro OS 10.6.6 , using MAMP Pro 1.9.4. I'm attempting to install Acquia's Drupal Commons locally. The installation progress bar goes all the way, I can check in phpMyadmin that the database has been populated, but before the site configuration screen , I get a 500 Server Error! Standard Drupal 6 or 7 install without any problem & I was able to install Drupal Commons on my web server. So it seems that some form of conflicts happens between my server configuration ( Mamp Pro ) and Drupal Commons. Thanks in advance for any suggestions!

    Read the article

  • Drupal pass argument to page

    - by stotastic
    I have a custom Drupal module displaying some data in a table. Each row has a link which if clicked will delete the relevant row. Specifically, when the link is clicked it will take the user to a confirmation page. This page is really just a drupal form which says 'are you sure' with two buttons: 'Yes', 'No'. I figure I will need to pass the rowID to the confirmation page. My question: What is the typically way to pass data to a new page in Drupal 7? I guess I could just add the rowID to the URL and use the $_GET[] from the confirmation page... I don't think this is very safe and was wondering if there was a better 'Drupal' way. Thanks!

    Read the article

  • Drupal 6: best way to upgrade jQuery ?

    - by Patrick
    Hi! I want to upgrade jQuery inside my drupal installation. At the moment I have jQuery 1.2.6 and I would like to upgrade it to jQuery 1.4 I guess some Drupal modules still depends on the old jQuery version. I've tried jquery_update module to upgrade jQuery, but it didn't work. It asked to replace the original Drupal files in the "misc" folder with the new ones, but it didn't work. Anyway, I was wondering if there is a better method instead of using another module thanks

    Read the article

  • Drupal migration failed

    - by Marco
    First of all, I'm new to Drupal and the work I have to do is some kind of too hard. My old colleague (webmaster) had a server with a multisite Drupal 6 installation. Sites and their dirs were (e.g.) Sites Site directory b.a.mycompany.com /drupal_install_dir/sites/b.a.mycompany.com c.a.mycompany.com /drupal_install_dir/sites/c.a.mycompany.com d.a.mycompany.com /drupal_install_dir/sites/d.a.mycompany.com Unluckily my colleague moved and server hdd aren't in my hands: all I have is a backup of /drupal_install_dir and three sql dumps (one for each site). I had to restore three sites, but changing them as z.mycompany.com/b z.mycompany.com/c z.mycompany.com/d Beeing a sysadmin, I Extracted tar.gz backup file under wwwroot (let's call full path to extracted directory /new_install_dir) Restored three databases Created mysql users and give them correct GRANTS on databases Then (trying to restore at least first site) I changed /new_install_dir/sites/settings.php putting correct database connection data and new basepath. But there is no way I can see my new site, simply it doesn't work. Watching /var/log/apache2/error.log I saw Drupal searching for main drupal database; so I created that db too setting user and grants, but dump file is empty. Well, now I can run something like install.php or update.php, but my site is not shown. Is there something I can do? Do I have to walk another way? Consider I searched the web, but I'm not able to find a guide that can help me for my problem. Ah, I forgot: before producing the backup, my colleague set site in maintenance mode. When I try to run z.mycompany.com/?q=user (trying to login) nothing happens. I'm really stuck...

    Read the article

  • hibernate query cache specify cache duration

    - by cometta
    below is how i do query cache getHibernateTemplate().setCacheQueries(true); List<IssSection> result = (List<IssSection>) getHibernateTemplate().findByCriteria(crit); getHibernateTemplate().setCacheQueries(false); may i know how to specify duration of maximum time to cache this method? let say i want to clear cache after 5 mins expirated

    Read the article

  • Application_End() cannot access cache through HttpContext.Current.Cache[key]

    - by Carl J.
    I want to be able to maintain certain objects between application restarts. To do that, I want to write specific cached items out to disk in Global.asax Application_End() function and re-load them back on Application_Start(). I currently have a cache helper class, which uses the following method to return the cached value: return HttpContext.Current.Cache[key]; Problem: during Application_End(), HttpContext.Current is null since there is no web request (it's an automated cleanup procedure) - therefore, I cannot access .Cache[] to retrieve any of the items to save to disk. Question: how can I access the cache items during Application_End()?

    Read the article

  • Ubuntu tweak and Mozilla (firefox and thunderbird) cache

    - by Avatar Parto
    I usually use Ubuntu tweak to do cleanup jobs on my PC. This includes apt and program cached data and old kernels. This goes alright for most programs except Mozilla based application - Firefox and Thunderbird. Ubuntu tweak doesn't seem to know where their cache folders are and always returns 'zero packages can be cleaned' even when the cache folder is full. Check screenshot below: I am looking for a way to clean up ALL my cache data and unneeded packages at one point. If someone knows how to change the ubuntu tweak cache folders for Firefox and Thunderbird, that would be perfect. I tried bleachbit last but it crashed my PC to a point I had to re-install Ubuntu. I am using Ubuntu tweak 0.8.6 on Ubuntu 13.04. Thanxs.

    Read the article

  • No cache and Google AdSense performance

    - by Luca
    I'm developing a page where I need to avoid JavaScript caching by browser. I've added this header: <?php header('Cache-Control: no-cache, no-store, must-revalidate'); header('Pragma: no-cache'); header('Expires: 0'); ?> After this, browsers didn't cache more JavaScript sorting out the issue, but in the same time I noticed a drop in Google AdSense RPM. Then I removed the added code and now Google AdSense RPM is reaching again a good value. So, how could I avoid JavaScript caching without meddle with AdSense performance?

    Read the article

  • Drupal Blog vs. WordPress Blog for a Drupal Website? [closed]

    - by Norma Riter
    Is there a blog of preference for SEO, when it comes down to Drupal websites. I ask as WordPress seems to have the better plug-ins, though may not integrate as well. Any thoughts on this? I am asking from primarily a SEO perspective though also a design one as well. In other words, there are so many fabulous blog templates in WordPress and not sure if there are in Drupal. I seem to be having a struggle finding Drupal blogs to purchase, such as premium blogs.

    Read the article

  • Measuring ASP.NET and SharePoint output cache

    - by DigiMortal
    During ASP.NET output caching week in my local blog I wrote about how to measure ASP.NET output cache. As my posting was based on real work and real-life results then I thought that this posting is maybe interesting to you too. So here you can read what I did, how I did and what was the result. Introduction Caching is not effective without measuring it. As MVP Henn Sarv said in one of his sessions then you will get what you measure. And right he is. Lately I measured caching on local Microsoft community portal to make sure that our caching strategy is good enough in environment where this system lives. In this posting I will show you how to start measuring the cache of your web applications. Although the application measured is built on SharePoint Server publishing infrastructure, all those counters have same meaning as similar counters under pure ASP.NET applications. Measured counters I used Performance Monitor and the following performance counters (their names are similar on ASP.NET and SharePoint WCMS): Total number of objects added – how much objects were added to output cache. Total object discards – how much objects were deleted from output cache. Cache hit count – how many times requests were served by cache. Cache hit ratio – percent of requests served from cache. The first three counters are cumulative while last one is coefficient. You can use also other counters to measure the full effect of caching (memory, processor, disk I/O, network load etc before and after caching). Measuring process The measuring I describe here started from freshly restarted web server. I measured application during 12 hours that covered also time ranges when users are most active. The time range does not include late evening hours and night because there is nothing to measure during these hours. During measuring we performed no maintenance or administrative tasks on server. All tasks performed were related to usual daily content management and content monitoring. Also we had no advertisement campaigns or other promotions running at same time. The results You can see the results on following graphic.   Total number of objects added   Total object discards   Cache hit count   Cache hit ratio You can see that adds and discards are growing in same tempo. It is good because cache expires and not so popular items are not kept in memory. If there are more popular content then the these lines may have bigger distance between them. Cache hit count grows faster and this shows that more and more content is served from cache. In current case it shows that cache is filled optimally and we can do even better if we tune caches more. The site contains also pages that are discarded when some subsite changes (page was added/modified/deleted) and one modification may affect about four or five pages. This may also decrease cache hit count because during day the site gets about 5-10 new pages. Cache hit ratio is currently extremely good. The suggested minimum is about 85% but after some tuning and measuring I achieved 98.7% as a result. This is due to the fact that new pages are most often requested and after new pages are added the older ones are requested only sometimes. So they get discarded from cache and only some of these will return sometimes back to cache. Although this may also indicate the need for additional SEO work the result is very well in technical means. Conclusion Measuring ASP.NET output cache is not complex thing to do and you can start by measuring performance of cache as a start. Later you can move on and measure caching effect to other counters such as disk I/O, network, processors etc. What you have to achieve is optimal cache that is not full of items asked only couple of times per day (you can avoid this by not using too long cache durations). After some tuning you should be able to boost cache hit ratio up to at least 85%.

    Read the article

  • In Drupal 6, is there a way to take a custom field from the latest post to a taxonomy term, and disp

    - by user278457
    The title for this question pretty much sums up what I'm asking. I've got a list of taxonomy terms, and I'm using a view to display the latest post to each one. I'd like to also display a custom field set up in CCK just under this. Currently, I'm just using "date updated" of the taxonomy term itself which was easy to set up in views. I'd like to drill a little deeper and get the custom "event date" field I've added to the content type last posted to the taxonomy term I'm "viewing". I've got a feeling I'm going to have to write my own database query for this. If (I can avoid that){ How do I set up such a view? } Else{ What's the best practice for including lower level database queries alongside views? }

    Read the article

  • How do I use a custom #theme function to a fieldset in a drupal module?

    - by Rob Crowell
    I have a module that builds a form that includes a fieldset. Instead of using the <legend> element to render the fieldset title, I want to place this content in a <div> element instead. But I want to change the behavior only for the form returned by my module, so I don't want to place any new functionality into my theme's template.php file. In mymod.module I have defined: // custom rendering function for fieldset elements function theme_mymod_fieldset($element) { return 'test'; } // implement hook_theme function mymod_theme() { return array( 'mymod_fieldset' => array('arguments' => array('element' => NULL)), 'mymod_form' => array('arguments' => array()) ); } // return a form that is based on the 'Basic Account Info' category of the user profile function mymod_form() { // load the user's profile global $user; $account = user_load($user->uid); // load the profile form, and then edit it $form_state = array(); $form = drupal_retrieve_form('user_profile_form', $form_state, $account, 'Basic Account Info'); // set the custom #theme function for this fieldset $form['Basic Account Info']['#theme'] = 'mymod_fieldset'; // more form manipulations // ... return $form; } When my page gets rendered, I expected to see the fieldset representing 'Basic Account Info' to be wholly replaced by my test message 'test'. Instead what happens is that the <fieldset> and <legend> elements are rendered as normal, but with the body of the fieldset replaced by the test message instead, like this: <fieldset> <legend>Basic Account Info</legend> test </fieldset> Why doesn't my #theme function have the chance to replace the entire <fieldset> element? If I wrap a textfield in this function instead, I am able to completely replace the <input> element along with its label. Furthermore, if I provide an override in my site's template.php for theme_fieldset, it works as expected and I am able to completely replace the <fieldset>, so I know it is possible. What's different about providing #theme functions to fieldsets inside a module?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >