Opened on 04/30/2015 at 01:46:04 PM

Closed on 04/30/2015 at 08:41:35 PM

#2440 closed change (fixed)

[cms] Add support for cache files

Reported by: sebastian Assignee: sebastian
Priority: P3 Milestone:
Module: Sitescripts Keywords:
Cc: Blocked By:
Blocking: #2432 Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

http://codereview.adblockplus.org/5488197752586240

Description (last modified by sebastian)

Background

Currently, there is no place custom filters and globals can store persistent data. However, sometimes you need to cache some data (e.g. to prevent site generation from crashing when external resources aren't available). This currently the case with #2432.

What to change

Implement Source.get_cache_dir() to be used by custom filters and globals via contextfilter and contextfunction.

When the website is generated (or served with the development server) from a local directory get_cache_dir() should return the absolute path to the cache subdirectory under the website's root.

If the website is generated via Mercurial, /var/cache/<repo-path> should be returned on unix. Other platforms don't need to be considered for this case.

Attachments (0)

Change History (3)

comment:1 Changed on 04/30/2015 at 01:47:57 PM by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed on 04/30/2015 at 02:40:58 PM by sebastian

  • Description modified (diff)

comment:3 Changed on 04/30/2015 at 08:41:35 PM by sebastian

  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from sebastian.
 
Note: See TracTickets for help on using tickets.